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 /// An array of property values.
28 /// <since_tizen> 3 </since_tizen>
29 public class PropertyArray : global::System.IDisposable
34 /// <since_tizen> 3 </since_tizen>
35 protected bool swigCMemOwn;
37 /// A Flat to check if it is already disposed.
39 /// <since_tizen> 3 </since_tizen>
40 protected bool disposed = false;
42 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
44 //A Flag to check who called Dispose(). (By User or DisposeQueue)
45 private bool isDisposeQueued = false;
50 /// <since_tizen> 3 </since_tizen>
51 public PropertyArray() : this(NDalicPINVOKE.new_Property_Array__SWIG_0(), true)
53 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 internal PropertyArray(PropertyArray other) : this(NDalicPINVOKE.new_Property_Array__SWIG_1(PropertyArray.getCPtr(other)), true)
58 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61 internal PropertyArray(global::System.IntPtr cPtr, bool cMemoryOwn)
63 swigCMemOwn = cMemoryOwn;
64 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
70 /// <since_tizen> 3 </since_tizen>
75 isDisposeQueued = true;
76 DisposeQueue.Instance.Add(this);
81 /// The operator to access an element.
83 /// <param name="index">The element index to access. No bounds checking is performed.</param>
84 /// <returns>The reference to the element.</returns>
85 /// <since_tizen> 3 </since_tizen>
86 public PropertyValue this[uint index]
90 return ValueOfIndex(index);
95 /// Retrieves the number of elements in the array.
97 /// <returns>The number of elements in the array.</returns>
98 /// <since_tizen> 3 </since_tizen>
101 uint ret = NDalicPINVOKE.Property_Array_Size(swigCPtr);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 /// Retrieves the number of elements in the array.
109 /// <returns>The number of elements in the array.</returns>
110 /// <since_tizen> 3 </since_tizen>
113 uint ret = NDalicPINVOKE.Property_Array_Count(swigCPtr);
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
119 /// Returns whether the array is empty.
121 /// <returns>Returns true if empty, false otherwise.</returns>
122 /// <since_tizen> 3 </since_tizen>
125 bool ret = NDalicPINVOKE.Property_Array_Empty(swigCPtr);
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 /// Clears the array.
133 /// <since_tizen> 3 </since_tizen>
136 NDalicPINVOKE.Property_Array_Clear(swigCPtr);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141 /// Increases the capacity of the array.
143 /// <param name="size">The size to reserve.</param>
144 /// <since_tizen> 3 </since_tizen>
145 public void Reserve(uint size)
147 NDalicPINVOKE.Property_Array_Reserve(swigCPtr, size);
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 /// <param name="size">The size to resize</param>
155 /// <since_tizen> 3 </since_tizen>
156 public void Resize(uint size)
158 NDalicPINVOKE.Property_Array_Resize(swigCPtr, size);
159 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 /// Retrieves the capacity of the array.
165 /// <returns>The allocated capacity of the array.</returns>
166 /// <since_tizen> 3 </since_tizen>
167 public uint Capacity()
169 uint ret = NDalicPINVOKE.Property_Array_Capacity(swigCPtr);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 /// Adds an element to the array.
177 /// <param name="value">The value to add at the end of the array.</param>
178 /// <since_tizen> 3 </since_tizen>
179 public void PushBack(PropertyValue value)
181 NDalicPINVOKE.Property_Array_PushBack(swigCPtr, PropertyValue.getCPtr(value));
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 /// Adds an keyvalue to the array.
187 /// This function should be first
189 /// <param name="value">The value to add at the end of the array.</param>
190 public PropertyArray Add(KeyValue value)
192 PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value.TrueValue)), false);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 /// Adds an element to the array.
200 /// <param name="value">The value to add at the end of the array.</param>
201 /// <since_tizen> 3 </since_tizen>
202 public PropertyArray Add(PropertyValue value)
204 PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value)), false);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 /// Accesses an element.
212 /// <param name="index">The element index to access. No bounds checking is performed.</param>
213 /// <returns>The reference to the element.</returns>
214 /// <since_tizen> 3 </since_tizen>
215 public PropertyValue GetElementAt(uint index)
217 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_GetElementAt__SWIG_0(swigCPtr, index), false);
218 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225 /// <since_tizen> 3 </since_tizen>
226 public void Dispose()
228 //Throw excpetion if Dispose() is called in separate thread.
229 if (!Window.IsInstalled())
231 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
236 Dispose(DisposeTypes.Implicit);
240 Dispose(DisposeTypes.Explicit);
241 System.GC.SuppressFinalize(this);
245 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyArray obj)
247 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
253 /// <since_tizen> 3 </since_tizen>
254 protected virtual void Dispose(DisposeTypes type)
261 if (type == DisposeTypes.Explicit)
264 //Release your own managed resources here.
265 //You should release all of your own disposable objects here.
268 //Release your own unmanaged resources here.
269 //You should not access any managed member here except static instance.
270 //because the execution order of Finalizes is non-deterministic.
272 if (swigCPtr.Handle != global::System.IntPtr.Zero)
277 NDalicPINVOKE.delete_Property_Array(swigCPtr);
279 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
285 /// Retrieves the value of elements in the array.
287 /// <param name="index">The element index to retrieve.</param>
288 /// <returns>The reference to the element.</returns>
289 private PropertyValue ValueOfIndex(uint index)
291 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Array_ValueOfIndex__SWIG_0(swigCPtr, index), false);
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 /// A key type which can be either a std::string or a Property::Index.
300 /// <since_tizen> 3 </since_tizen>
301 public class PropertyKey : global::System.IDisposable
306 /// <since_tizen> 3 </since_tizen>
307 protected bool swigCMemOwn;
309 /// A Flat to check if it is already disposed.
311 /// <since_tizen> 3 </since_tizen>
312 protected bool disposed = false;
314 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
316 //A Flag to check who called Dispose(). (By User or DisposeQueue)
317 private bool isDisposeQueued = false;
322 /// <param name="key">The string key.</param>
323 /// <since_tizen> 3 </since_tizen>
324 public PropertyKey(string key) : this(NDalicPINVOKE.new_Property_Key__SWIG_0(key), true)
326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332 /// <param name="key">The index key.</param>
333 /// <since_tizen> 3 </since_tizen>
334 public PropertyKey(int key) : this(NDalicPINVOKE.new_Property_Key__SWIG_1(key), true)
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 internal PropertyKey(global::System.IntPtr cPtr, bool cMemoryOwn)
341 swigCMemOwn = cMemoryOwn;
342 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
348 /// <since_tizen> 3 </since_tizen>
353 isDisposeQueued = true;
354 DisposeQueue.Instance.Add(this);
361 /// <since_tizen> 3 </since_tizen>
365 /// The type of key is index.
367 /// <since_tizen> 3 </since_tizen>
370 /// The type of key is string.
372 /// <since_tizen> 3 </since_tizen>
377 /// The type of the key.
379 /// <since_tizen> 3 </since_tizen>
380 public PropertyKey.KeyType Type
384 NDalicPINVOKE.Property_Key_type_set(swigCPtr, (int)value);
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
389 PropertyKey.KeyType ret = (PropertyKey.KeyType)NDalicPINVOKE.Property_Key_type_get(swigCPtr);
390 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
398 /// <since_tizen> 3 </since_tizen>
403 NDalicPINVOKE.Property_Key_indexKey_set(swigCPtr, value);
404 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
408 int ret = NDalicPINVOKE.Property_Key_indexKey_get(swigCPtr);
409 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417 /// <since_tizen> 3 </since_tizen>
418 public string StringKey
422 NDalicPINVOKE.Property_Key_stringKey_set(swigCPtr, value);
423 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
427 string ret = NDalicPINVOKE.Property_Key_stringKey_get(swigCPtr);
428 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436 /// <since_tizen> 3 </since_tizen>
437 public void Dispose()
439 //Throw excpetion if Dispose() is called in separate thread.
440 if (!Window.IsInstalled())
442 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
447 Dispose(DisposeTypes.Implicit);
451 Dispose(DisposeTypes.Explicit);
452 System.GC.SuppressFinalize(this);
457 /// Compares if rhs is equal to.
459 /// <param name="rhs">A string key to compare against.</param>
460 /// <returns>Returns true if the key compares, or false if it isn't equal or of the wrong type.</returns>
461 /// <since_tizen> 3 </since_tizen>
462 public bool EqualTo(string rhs)
464 bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_0(swigCPtr, rhs);
465 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
470 /// Compares if rhs is equal to.
472 /// <param name="rhs">The index key to compare against.</param>
473 /// <returns>Returns true if the key compares, or false if it isn't equal or of the wrong type.</returns>
474 /// <since_tizen> 3 </since_tizen>
475 public bool EqualTo(int rhs)
477 bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_1(swigCPtr, rhs);
478 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
483 /// Compares if rhs is equal to
485 /// <param name="rhs">A key to compare against</param>
486 /// <returns>Returns true if the keys are of the same type and have the same value.</returns>
487 /// <since_tizen> 3 </since_tizen>
488 public bool EqualTo(PropertyKey rhs)
490 bool ret = NDalicPINVOKE.Property_Key_EqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs));
491 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
496 /// Compares if rhs is not equal to.
498 /// <param name="rhs">The index key to compare against.</param>
499 /// <returns>Returns true if the key is not equal or not a string key.</returns>
500 /// <since_tizen> 3 </since_tizen>
501 public bool NotEqualTo(string rhs)
503 bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_0(swigCPtr, rhs);
504 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
509 /// Compares if rhs is not equal to.
511 /// <param name="rhs">The index key to compare against.</param>
512 /// <returns>Returns true if the key is not equal, or not the index key.</returns>
513 /// <since_tizen> 3 </since_tizen>
514 public bool NotEqualTo(int rhs)
516 bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_1(swigCPtr, rhs);
517 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
522 /// Compares if rhs is not equal to.
524 /// <param name="rhs">A key to compare against.</param>
525 /// <returns>Returns true if the keys are not of the same type or are not equal.</returns>
526 /// <since_tizen> 3 </since_tizen>
527 public bool NotEqualTo(PropertyKey rhs)
529 bool ret = NDalicPINVOKE.Property_Key_NotEqualTo__SWIG_2(swigCPtr, PropertyKey.getCPtr(rhs));
530 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
534 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyKey obj)
536 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
542 /// <since_tizen> 3 </since_tizen>
543 protected virtual void Dispose(DisposeTypes type)
550 if (type == DisposeTypes.Explicit)
553 //Release your own managed resources here.
554 //You should release all of your own disposable objects here.
557 //Release your own unmanaged resources here.
558 //You should not access any managed member here except static instance.
559 //because the execution order of Finalizes is non-deterministic.
561 if (swigCPtr.Handle != global::System.IntPtr.Zero)
566 NDalicPINVOKE.delete_Property_Key(swigCPtr);
568 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
575 /// A map of property values, the key type could be string or Property::Index.
577 /// <since_tizen> 3 </since_tizen>
578 public class PropertyMap : global::System.IDisposable
583 /// <since_tizen> 3 </since_tizen>
584 protected bool swigCMemOwn;
586 /// A Flat to check if it is already disposed.
588 /// <since_tizen> 3 </since_tizen>
589 protected bool disposed = false;
591 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
593 //A Flag to check who called Dispose(). (By User or DisposeQueue)
594 private bool isDisposeQueued = false;
599 /// <since_tizen> 3 </since_tizen>
600 public PropertyMap() : this(NDalicPINVOKE.new_Property_Map__SWIG_0(), true)
602 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
606 /// The copy constructor.
608 /// <param name="other">The map to copy from.</param>
609 /// <since_tizen> 3 </since_tizen>
610 public PropertyMap(PropertyMap other) : this(NDalicPINVOKE.new_Property_Map__SWIG_1(PropertyMap.getCPtr(other)), true)
612 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
615 internal PropertyMap(global::System.IntPtr cPtr, bool cMemoryOwn)
617 swigCMemOwn = cMemoryOwn;
618 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
624 /// <since_tizen> 3 </since_tizen>
629 isDisposeQueued = true;
630 DisposeQueue.Instance.Add(this);
635 /// The operator to access the element with the specified string key.<br />
636 /// If an element with the key does not exist, then it is created.<br />
638 /// <param name="key">The key whose value to access.</param>
639 /// <returns>A value for the element with the specified key.</returns>
640 /// <since_tizen> 3 </since_tizen>
641 public PropertyValue this[string key]
645 return ValueOfIndex(key);
650 /// The operator to access the element with the specified index key.<br />
651 /// If an element with the key does not exist, then it is created.<br />
653 /// <param name="key">The key whose value to access.</param>
654 /// <returns>A value for the element with the specified key.</returns>
655 /// <since_tizen> 3 </since_tizen>
656 public PropertyValue this[int key]
660 return ValueOfIndex(key);
667 /// <since_tizen> 3 </since_tizen>
668 public void Dispose()
670 //Throw excpetion if Dispose() is called in separate thread.
671 if (!Window.IsInstalled())
673 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
678 Dispose(DisposeTypes.Implicit);
682 Dispose(DisposeTypes.Explicit);
683 System.GC.SuppressFinalize(this);
688 /// Retrieves the number of elements in the map.
690 /// <returns>The number of elements in the map.</returns>
691 /// <since_tizen> 3 </since_tizen>
694 uint ret = NDalicPINVOKE.Property_Map_Count(swigCPtr);
695 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
700 /// Returns whether the map is empty.
702 /// <returns>Returns true if empty, false otherwise.</returns>
703 /// <since_tizen> 3 </since_tizen>
706 bool ret = NDalicPINVOKE.Property_Map_Empty(swigCPtr);
707 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
712 /// Inserts the key-value pair in the map, with the key type as string.<br />
713 /// Does not check for duplicates.<br />
715 /// <param name="key">The key to insert.</param>
716 /// <param name="value">The value to insert.</param>
717 /// <since_tizen> 3 </since_tizen>
718 public void Insert(string key, PropertyValue value)
720 NDalicPINVOKE.Property_Map_Insert__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value));
721 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
725 /// Inserts the key-value pair in the map, with the key type as index.<br />
726 /// Does not check for duplicates.<br />
728 /// <param name="key">The key to insert.</param>
729 /// <param name="value">The value to insert.</param>
730 /// <since_tizen> 3 </since_tizen>
731 public void Insert(int key, PropertyValue value)
733 NDalicPINVOKE.Property_Map_Insert__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value));
734 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
738 /// Inserts the key-value pair in the map, with the key type as string.<br />
739 /// Does not check for duplicates.<br />
741 /// <param name="key">The key to insert.</param>
742 /// <param name="value">The value to insert.</param>
743 /// <returns>Returns a reference to this object.</returns>
744 /// <since_tizen> 3 </since_tizen>
745 public PropertyMap Add(string key, PropertyValue value)
747 PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, key, PropertyValue.getCPtr(value)), false);
748 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
753 /// Inserts the key-value pair in the map, with the key type as string.<br />
754 /// Does not check for duplicates.<br />
756 /// <param name="key">The key to insert.</param>
757 /// <param name="value">The value to insert.</param>
758 /// <returns>Returns a reference to this object.</returns>
759 /// <since_tizen> 3 </since_tizen>
760 public PropertyMap Add(int key, PropertyValue value)
762 PropertyMap ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, key, PropertyValue.getCPtr(value)), false);
763 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
768 /// Inserts the keyvalue to the map.<br />
769 /// Does not check for duplicates.<br />
771 /// <param name="keyValue">The keyvalue to insert.</param>
772 /// <returns>Returns a reference to this object.</returns>
773 public PropertyMap Add(KeyValue keyValue)
775 PropertyMap ret = new PropertyMap();
776 if ( keyValue.KeyInt != null )
778 ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, (int)keyValue.KeyInt, PropertyValue.getCPtr(keyValue.TrueValue)), false);
780 else if ( keyValue.KeyString != null)
782 ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, keyValue.KeyString, PropertyValue.getCPtr(keyValue.TrueValue)), false);
784 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
790 /// Retrieves the value at the specified position.
792 /// <param name="position">The specified position.</param>
793 /// <returns>A reference to the value at the specified position.</returns>
794 /// <since_tizen> 3 </since_tizen>
795 public PropertyValue GetValue(uint position)
797 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_GetValue(swigCPtr, position), false);
798 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
803 /// Retrieves the key at the specified position.
805 /// <param name="position">The specified position.</param>
806 /// <returns>A copy of the key at the specified position.</returns>
807 /// <since_tizen> 3 </since_tizen>
808 public PropertyKey GetKeyAt(uint position)
810 PropertyKey ret = new PropertyKey(NDalicPINVOKE.Property_Map_GetKeyAt(swigCPtr, position), true);
811 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
816 /// Finds the value for the specified key if it exists.
818 /// <param name="key">The key to find.</param>
819 /// <returns>The value if it exists, an empty object otherwise.</returns>
820 /// <since_tizen> 3 </since_tizen>
821 public PropertyValue Find(int key)
823 global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_2(swigCPtr, key);
824 PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
825 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
830 /// Finds the value for the specified keys if either exist.
832 /// <param name="indexKey">The index key to find.</param>
833 /// <param name="stringKey">The string key to find.</param>
834 /// <returns>The value if it exists, an empty object otherwise.</returns>
835 /// <since_tizen> 3 </since_tizen>
836 public PropertyValue Find(int indexKey, string stringKey)
838 global::System.IntPtr cPtr = NDalicPINVOKE.Property_Map_Find__SWIG_3(swigCPtr, indexKey, stringKey);
839 PropertyValue ret = (cPtr == global::System.IntPtr.Zero) ? null : new PropertyValue(cPtr, false);
840 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
847 /// <since_tizen> 3 </since_tizen>
850 NDalicPINVOKE.Property_Map_Clear(swigCPtr);
851 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
855 /// Merges values from the map 'from' to the current.<br />
856 /// Any values in 'from' will overwrite the values in the current map.<br />
858 /// <param name="from">The map to merge from.</param>
859 /// <since_tizen> 3 </since_tizen>
860 public void Merge(PropertyMap from)
862 NDalicPINVOKE.Property_Map_Merge(swigCPtr, PropertyMap.getCPtr(from));
863 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
867 /// Retrieves the element with the specified string key.
869 /// <param name="key">The key whose value to retrieve.</param>
870 /// <returns>The value for the element with the specified key.</returns>
871 internal PropertyValue ValueOfIndex(string key)
873 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_0(swigCPtr, key), false);
874 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
879 /// Retrieves the element with the specified index key.
881 /// <param name="key">The key whose value to retrieve.</param>
882 /// <returns>The value for the element with the specified key.</returns>
883 internal PropertyValue ValueOfIndex(int key)
885 PropertyValue ret = new PropertyValue(NDalicPINVOKE.Property_Map_ValueOfIndex__SWIG_2(swigCPtr, key), false);
886 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
890 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyMap obj)
892 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
898 /// <since_tizen> 3 </since_tizen>
899 protected virtual void Dispose(DisposeTypes type)
906 if (type == DisposeTypes.Explicit)
909 //Release your own managed resources here.
910 //You should release all of your own disposable objects here.
913 //Release your own unmanaged resources here.
914 //You should not access any managed member here except static instance.
915 //because the execution order of Finalizes is non-deterministic.
917 if (swigCPtr.Handle != global::System.IntPtr.Zero)
922 NDalicPINVOKE.delete_Property_Map(swigCPtr);
924 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
931 /// A value-type representing a property value.
933 /// <since_tizen> 3 </since_tizen>
934 public class PropertyValue : global::System.IDisposable
939 /// <since_tizen> 3 </since_tizen>
940 protected bool swigCMemOwn;
942 /// A Flat to check if it is already disposed.
944 /// <since_tizen> 3 </since_tizen>
945 protected bool disposed = false;
947 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
949 //A Flag to check who called Dispose(). (By User or DisposeQueue)
950 private bool isDisposeQueued = false;
953 /// Creates a Size2D property value.
955 /// <param name="vectorValue">Size2D values.</param>
956 /// <since_tizen> 3 </since_tizen>
957 public PropertyValue(Size2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Size2D.getCPtr(vectorValue)), true)
959 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
963 /// Creates a Position2D property value.
965 /// <param name="vectorValue">Position2D values.</param>
966 /// <since_tizen> 3 </since_tizen>
967 public PropertyValue(Position2D vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Position2D.getCPtr(vectorValue)), true)
969 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
973 /// Creates a Position property value.
975 /// <param name="vectorValue">Position values.</param>
976 /// <since_tizen> 3 </since_tizen>
977 public PropertyValue(Position vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Position.getCPtr(vectorValue)), true)
979 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983 /// Creates a Color property value.
985 /// <param name="vectorValue">Color values.</param>
986 /// <since_tizen> 3 </since_tizen>
987 public PropertyValue(Color vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Color.getCPtr(vectorValue)), true)
989 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
992 /// The default constructor.
994 /// <since_tizen> 3 </since_tizen>
995 public PropertyValue() : this(NDalicPINVOKE.new_Property_Value__SWIG_0(), true)
997 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1001 /// Creates a boolean property value.
1003 /// <param name="boolValue">A boolean value.</param>
1004 /// <since_tizen> 3 </since_tizen>
1005 public PropertyValue(bool boolValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_1(boolValue), true)
1007 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1011 /// Creates an integer property value.
1013 /// <param name="integerValue">An integer value.</param>
1014 /// <since_tizen> 3 </since_tizen>
1015 public PropertyValue(int integerValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_2(integerValue), true)
1017 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1021 /// Creates a float property value.
1023 /// <param name="floatValue">A floating-point value.</param>
1024 /// <since_tizen> 3 </since_tizen>
1025 public PropertyValue(float floatValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_3(floatValue), true)
1027 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1031 /// Creates a Vector2 property value.
1033 /// <param name="vectorValue">A vector of 2 floating-point values.</param>
1034 /// <since_tizen> 3 </since_tizen>
1035 public PropertyValue(Vector2 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_4(Vector2.getCPtr(vectorValue)), true)
1037 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1041 /// Creates a Vector3 property value.
1043 /// <param name="vectorValue">A vector of 3 floating-point values.</param>
1044 /// <since_tizen> 3 </since_tizen>
1045 public PropertyValue(Vector3 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Vector3.getCPtr(vectorValue)), true)
1047 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1051 /// Creates a Vector4 property value.
1053 /// <param name="vectorValue">A vector of 4 floating-point values.</param>
1054 /// <since_tizen> 3 </since_tizen>
1055 public PropertyValue(Vector4 vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_6(Vector4.getCPtr(vectorValue)), true)
1057 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1061 /// Creates a Rectangle property value.
1063 /// <param name="vectorValue">Rectangle values.</param>
1064 /// <since_tizen> 3 </since_tizen>
1065 public PropertyValue(Rectangle vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_9(Rectangle.getCPtr(vectorValue)), true)
1067 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1071 /// Creates a Rotation property value.
1073 /// <param name="quaternion">Rotation values.</param>
1074 /// <since_tizen> 3 </since_tizen>
1075 public PropertyValue(Rotation quaternion) : this(NDalicPINVOKE.new_Property_Value__SWIG_11(Rotation.getCPtr(quaternion)), true)
1077 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1081 /// Creates a string property value.
1083 /// <param name="stringValue">A string.</param>
1084 /// <since_tizen> 3 </since_tizen>
1085 public PropertyValue(string stringValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_12(stringValue), true)
1087 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1091 /// Creates an array property value.
1093 /// <param name="arrayValue">An array.</param>
1094 /// <since_tizen> 3 </since_tizen>
1095 public PropertyValue(PropertyArray arrayValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_14(PropertyArray.getCPtr(arrayValue)), true)
1097 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1101 /// Creates a map property value.
1103 /// <param name="mapValue">An array.</param>
1104 /// <since_tizen> 3 </since_tizen>
1105 public PropertyValue(PropertyMap mapValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_15(PropertyMap.getCPtr(mapValue)), true)
1107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1111 /// Creates a Extents value.
1113 /// <param name="extentsValue">A Extents value.</param>
1114 /// <since_tizen> 4 </since_tizen>
1115 public PropertyValue(Extents extentsValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_16(Extents.getCPtr(extentsValue)), true)
1117 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1121 /// Creates a PropertyType value.
1123 /// <param name="type">A PropertyType value.</param>
1124 /// <since_tizen> 3 </since_tizen>
1125 public PropertyValue(PropertyType type) : this(NDalicPINVOKE.new_Property_Value__SWIG_17((int)type), true)
1127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1131 /// Creates a PropertyValue value.
1133 /// <param name="value">A PropertyValue value.</param>
1134 /// <since_tizen> 3 </since_tizen>
1135 public PropertyValue(PropertyValue value) : this(NDalicPINVOKE.new_Property_Value__SWIG_18(PropertyValue.getCPtr(value)), true)
1137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1141 /// Creates a Size property value.
1143 /// <param name="vectorValue">Size values.</param>
1144 internal PropertyValue(Size vectorValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_5(Size.getCPtr(vectorValue)), true)
1146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1149 internal PropertyValue(global::System.IntPtr cPtr, bool cMemoryOwn)
1151 swigCMemOwn = cMemoryOwn;
1152 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1155 internal PropertyValue(Matrix3 matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_7(Matrix3.getCPtr(matrixValue)), true)
1157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1160 internal PropertyValue(Matrix matrixValue) : this(NDalicPINVOKE.new_Property_Value__SWIG_8(Matrix.getCPtr(matrixValue)), true)
1162 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1165 internal PropertyValue(AngleAxis angleAxis) : this(NDalicPINVOKE.new_Property_Value__SWIG_10(AngleAxis.getCPtr(angleAxis)), true)
1167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1173 /// <since_tizen> 3 </since_tizen>
1176 if(!isDisposeQueued)
1178 isDisposeQueued = true;
1179 DisposeQueue.Instance.Add(this);
1184 /// An extension to the property value class that allows us to create a
1185 /// Property value from a C# object, for example, integer, float, or string.<br />
1187 /// <param name="obj">An object to create.</param>
1188 /// <returns>The created value.</returns>
1189 /// <since_tizen> 3 </since_tizen>
1190 static public PropertyValue CreateFromObject(System.Object obj)
1192 System.Type type = obj.GetType();
1194 PropertyValue value;
1197 value = new PropertyValue((int)obj);//Enum.Parse(type, str);
1199 else if (type.Equals(typeof(int)))
1201 value = new PropertyValue((int)obj);
1203 else if (type.Equals(typeof(System.Int32)))
1205 value = new PropertyValue((int)obj);
1207 else if (type.Equals(typeof(bool)))
1209 value = new PropertyValue((bool)obj);
1211 else if (type.Equals(typeof(float)))
1213 value = new PropertyValue((float)obj);
1215 else if (type.Equals(typeof(string)))
1217 value = new PropertyValue((string)obj);
1219 else if (type.Equals(typeof(Vector2)))
1221 value = new PropertyValue((Vector2)obj);
1223 else if (type.Equals(typeof(Vector3)))
1225 value = new PropertyValue((Vector3)obj);
1227 else if (type.Equals(typeof(Vector4)))
1229 value = new PropertyValue((Vector4)obj);
1231 else if (type.Equals(typeof(Position)))
1233 value = new PropertyValue((Position)obj);
1235 else if (type.Equals(typeof(Position2D)))
1237 value = new PropertyValue((Position2D)obj);
1239 else if (type.Equals(typeof(Size)))
1241 value = new PropertyValue((Size)obj);
1243 else if (type.Equals(typeof(Size2D)))
1245 value = new PropertyValue((Size2D)obj);
1247 else if (type.Equals(typeof(Color)))
1249 value = new PropertyValue((Color)obj);
1251 else if (type.Equals(typeof(Rotation)))
1253 value = new PropertyValue((Rotation)obj);
1255 else if (type.Equals(typeof(RelativeVector2)))
1257 value = new PropertyValue((RelativeVector2)obj);
1259 else if (type.Equals(typeof(RelativeVector3)))
1261 value = new PropertyValue((RelativeVector3)obj);
1263 else if (type.Equals(typeof(RelativeVector4)))
1265 value = new PropertyValue((RelativeVector4)obj);
1267 else if(type.Equals(typeof(Extents)))
1269 value = new PropertyValue((Extents)obj);
1273 throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
1275 //NUILog.Debug(" got an property value of =" + type.Name);
1282 /// <since_tizen> 3 </since_tizen>
1283 public void Dispose()
1285 //Throw excpetion if Dispose() is called in separate thread.
1286 if (!Window.IsInstalled())
1288 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1291 if (isDisposeQueued)
1293 Dispose(DisposeTypes.Implicit);
1297 Dispose(DisposeTypes.Explicit);
1298 System.GC.SuppressFinalize(this);
1303 /// Retrieves a Size2D value.
1305 /// <param name="vectorValue"> On return, a Size2D value.</param>
1306 /// <since_tizen> 3 </since_tizen>
1307 public bool Get(Size2D vectorValue)
1309 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Size2D.getCPtr(vectorValue));
1310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1315 /// Retrieves a Position2D value.
1317 /// <param name="vectorValue"> On return, a Position2D value.</param>
1318 /// <since_tizen> 3 </since_tizen>
1319 public bool Get(Position2D vectorValue)
1321 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Position2D.getCPtr(vectorValue));
1322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1327 /// Retrieves a Size value.
1329 /// <param name="vectorValue"> On return, a size value.</param>
1330 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1331 [EditorBrowsable(EditorBrowsableState.Never)]
1332 public bool Get(Size vectorValue)
1334 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Size.getCPtr(vectorValue));
1335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1340 /// Retrieves a Position value.
1342 /// <param name="vectorValue"> On return, a position value.</param>
1343 /// <since_tizen> 3 </since_tizen>
1344 public bool Get(Position vectorValue)
1346 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Position.getCPtr(vectorValue));
1347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1352 /// Retrieves a Color value.
1354 /// <param name="vectorValue"> On return, a color value.</param>
1355 /// <since_tizen> 3 </since_tizen>
1356 public bool Get(Color vectorValue)
1358 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Color.getCPtr(vectorValue));
1359 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1364 /// Queries the type of this property value.
1366 /// <returns>The type ID</returns>
1367 /// <since_tizen> 3 </since_tizen>
1368 public new PropertyType GetType()
1370 PropertyType ret = (PropertyType)NDalicPINVOKE.Property_Value_GetType(swigCPtr);
1371 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1376 /// Retrieves a boolean value.
1378 /// <param name="boolValue">On return, a boolean value.</param>
1379 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1380 /// <since_tizen> 3 </since_tizen>
1381 public bool Get(out bool boolValue)
1383 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_1(swigCPtr, out boolValue);
1384 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1389 /// Retrieves a floating-point value.
1391 /// <param name="floatValue">On return, a floating-point value.</param>
1392 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1393 /// <since_tizen> 3 </since_tizen>
1394 public bool Get(out float floatValue)
1396 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_2(swigCPtr, out floatValue);
1397 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1402 /// Retrieves an integer value.
1404 /// <param name="integerValue">On return, an integer value.</param>
1405 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1406 /// <since_tizen> 3 </since_tizen>
1407 public bool Get(out int integerValue)
1409 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_3(swigCPtr, out integerValue);
1410 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1415 /// Retrieves an integer rectangle.
1417 /// <param name="rect">On return, an integer rectangle.</param>
1418 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1419 /// <since_tizen> 3 </since_tizen>
1420 public bool Get(Rectangle rect)
1422 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_4(swigCPtr, Rectangle.getCPtr(rect));
1423 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1428 /// Retrieves a vector value.
1430 /// <param name="vectorValue">On return, a vector value.</param>
1431 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1432 /// <since_tizen> 3 </since_tizen>
1433 public bool Get(Vector2 vectorValue)
1435 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, Vector2.getCPtr(vectorValue));
1436 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1441 /// Retrieves a vector value.
1443 /// <param name="vectorValue">On return, a vector value.</param>
1444 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1445 /// <since_tizen> 3 </since_tizen>
1446 public bool Get(Vector3 vectorValue)
1448 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, Vector3.getCPtr(vectorValue));
1449 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1454 /// Retrieves a vector value.
1456 /// <param name="vectorValue">On return, a vector value.</param>
1457 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1458 /// <since_tizen> 3 </since_tizen>
1459 public bool Get(Vector4 vectorValue)
1461 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, Vector4.getCPtr(vectorValue));
1462 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1467 /// Retrieves a vector value.
1469 /// <param name="vectorValue">On return, a vector value.</param>
1470 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1471 /// <since_tizen> 5 </since_tizen>
1472 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1473 [EditorBrowsable(EditorBrowsableState.Never)]
1474 public bool Get(RelativeVector2 vectorValue)
1476 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_5(swigCPtr, RelativeVector2.getCPtr(vectorValue));
1477 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1482 /// Retrieves a vector value.
1484 /// <param name="vectorValue">On return, a vector value.</param>
1485 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1486 /// <since_tizen> 5 </since_tizen>
1487 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1488 [EditorBrowsable(EditorBrowsableState.Never)]
1489 public bool Get(RelativeVector3 vectorValue)
1491 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_6(swigCPtr, RelativeVector3.getCPtr(vectorValue));
1492 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1497 /// Retrieves a vector value.
1499 /// <param name="vectorValue">On return, a vector value.</param>
1500 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1501 /// <since_tizen> 5 </since_tizen>
1502 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
1503 [EditorBrowsable(EditorBrowsableState.Never)]
1504 public bool Get(RelativeVector4 vectorValue)
1506 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_7(swigCPtr, RelativeVector4.getCPtr(vectorValue));
1507 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1512 /// Retrieves a rotation value.
1514 /// <param name="quaternionValue">On return, a rotation value.</param>
1515 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1516 /// <since_tizen> 3 </since_tizen>
1517 public bool Get(Rotation quaternionValue)
1519 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_11(swigCPtr, Rotation.getCPtr(quaternionValue));
1520 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1525 /// Retrieves a string property value.
1527 /// <param name="stringValue">On return, a string.</param>
1528 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1529 /// <since_tizen> 3 </since_tizen>
1530 public bool Get(out string stringValue)
1532 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_12(swigCPtr, out stringValue);
1533 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1538 /// Retrieves an array property value.
1540 /// <param name="arrayValue">On return, the array as a vector property values.</param>
1541 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1542 /// <since_tizen> 3 </since_tizen>
1543 public bool Get(PropertyArray arrayValue)
1545 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_13(swigCPtr, PropertyArray.getCPtr(arrayValue));
1546 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1551 /// Retrieves a map property value.
1553 /// <param name="mapValue">On return, the map as vector of string and property value pairs.</param>
1554 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1555 /// <since_tizen> 3 </since_tizen>
1556 public bool Get(PropertyMap mapValue)
1558 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_14(swigCPtr, PropertyMap.getCPtr(mapValue));
1559 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1564 /// Retrieves a Extents value.
1566 /// <param name="extentsValue">On return, a extents.</param>
1567 /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
1568 /// <since_tizen> 4 </since_tizen>
1569 public bool Get(Extents extentsValue)
1571 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_15(swigCPtr, Extents.getCPtr(extentsValue));
1572 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1576 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyValue obj)
1578 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1581 internal bool Get(Matrix3 matrixValue)
1583 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_8(swigCPtr, Matrix3.getCPtr(matrixValue));
1584 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1588 internal bool Get(Matrix matrixValue)
1590 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_9(swigCPtr, Matrix.getCPtr(matrixValue));
1591 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1595 internal bool Get(AngleAxis angleAxisValue)
1597 bool ret = NDalicPINVOKE.Property_Value_Get__SWIG_10(swigCPtr, AngleAxis.getCPtr(angleAxisValue));
1598 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1605 /// <since_tizen> 3 </since_tizen>
1606 protected virtual void Dispose(DisposeTypes type)
1613 if (type == DisposeTypes.Explicit)
1616 //Release your own managed resources here.
1617 //You should release all of your own disposable objects here.
1620 //Release your own unmanaged resources here.
1621 //You should not access any managed member here except static instance.
1622 //because the execution order of Finalizes is non-deterministic.
1624 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1628 swigCMemOwn = false;
1629 NDalicPINVOKE.delete_Property_Value(swigCPtr);
1631 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1640 public class KeyValue
1645 public int? KeyInt = null;
1650 public string KeyString = null;
1655 public PropertyValue TrueValue = null;
1657 private string _key = null;
1658 private object _originalValue = null;
1659 private object _originalKey = null;
1662 /// Default Constructor.
1684 /// OriginalKey property.
1686 public object OriginalKey
1690 return _originalKey;
1694 _originalKey = value;
1695 if (value is int || value is Int32)
1697 KeyInt = (int)value;
1699 else if (value is string)
1701 KeyString = value.ToString();
1703 else if (value.GetType().Equals(typeof(int)) || value.GetType().Equals(typeof(Int32)))
1705 KeyInt = (int)value;
1707 else if (value.GetType().Equals(typeof(string)))
1709 KeyString = value.ToString();
1721 return _originalValue;
1725 _originalValue = value;
1726 TrueValue = PropertyValue.CreateFromObject(value);
1731 /// IntergerValue property.
1733 public int IntergerValue
1737 TrueValue = new PropertyValue(value);
1742 /// BooleanValue property.
1744 public bool BooleanValue
1748 TrueValue = new PropertyValue(value);
1753 /// SingleValue property.
1755 public float SingleValue
1759 TrueValue = new PropertyValue(value);
1764 /// StringValue property.
1766 public string StringValue
1770 TrueValue = new PropertyValue(value);
1775 /// Vector2Value property.
1777 public Vector2 Vector2Value
1781 TrueValue = new PropertyValue(value);
1786 /// Vector3Value property.
1788 public Vector3 Vector3Value
1792 TrueValue = new PropertyValue(value);
1797 /// Vector4Value property.
1799 public Vector4 Vector4Value
1803 TrueValue = new PropertyValue(value);
1808 /// PositionValue property.
1810 public Position PositionValue
1814 TrueValue = new PropertyValue(value);
1819 /// Position2DValue property.
1821 public Position2D Position2DValue
1825 TrueValue = new PropertyValue(value);
1830 /// SizeValue property.
1832 public Size SizeValue
1836 TrueValue = new PropertyValue(value);
1841 /// Size2DValue property.
1843 public Size2D Size2DValue
1847 TrueValue = new PropertyValue(value);
1852 /// ColorValue property.
1854 public Color ColorValue
1858 TrueValue = new PropertyValue(value);
1863 /// RectangleValue property.
1865 public Rectangle RectangleValue
1869 TrueValue = new PropertyValue(value);
1874 /// RotationValue property.
1876 public Rotation RotationValue
1880 TrueValue = new PropertyValue(value);
1885 /// RelativeVector2Value property.
1887 public RelativeVector2 RelativeVector2Value
1891 TrueValue = new PropertyValue(value);
1896 /// RelativeVector3Value property.
1898 public RelativeVector3 RelativeVector3Value
1902 TrueValue = new PropertyValue(value);
1907 /// RelativeVector4Value property.
1909 public RelativeVector4 RelativeVector4Value
1913 TrueValue = new PropertyValue(value);
1918 /// ExtentsValue property.
1920 public Extents ExtentsValue
1924 TrueValue = new PropertyValue(value);
1929 /// PropertyArrayValue property.
1931 public PropertyArray PropertyArrayValue
1935 TrueValue = new PropertyValue(value);
1940 /// PropertyMapValue property.
1942 public PropertyMap PropertyMapValue
1946 TrueValue = new PropertyValue(value);
1950 private void ParseKey(string key)
1953 if (VisualExtension.KeyDictionary.ContainsKey(key))
1955 VisualExtension.KeyDictionary.TryGetValue(key, out v);
1965 internal class Property : global::System.IDisposable
1970 /// <since_tizen> 3 </since_tizen>
1971 protected bool swigCMemOwn;
1973 /// <since_tizen> 3 </since_tizen>
1974 /// A Flat to check if it is already disposed.
1976 protected bool disposed = false;
1978 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1980 //A Flag to check who called Dispose(). (By User or DisposeQueue)
1981 private bool isDisposeQueued = false;
1984 /// This constructor creates a property instance.
1986 /// <param name="arg0">A valid handle to the target object.</param>
1987 /// <param name="propertyIndex">The index of a property.</param>
1988 /// <since_tizen> 3 </since_tizen>
1989 public Property(Animatable arg0, int propertyIndex) : this(NDalicPINVOKE.new_Property__SWIG_0(Animatable.getCPtr(arg0), propertyIndex), true)
1991 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1995 /// This constructor creates a property instance.
1997 /// <param name="arg0">A valid handle to the target object.</param>
1998 /// <param name="propertyIndex">The index of a property.</param>
1999 /// <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>
2000 /// <since_tizen> 3 </since_tizen>
2001 public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_1(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true)
2003 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2007 /// This constructor creates a property instance.<br />
2008 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
2010 /// <param name="arg0">A valid handle to the target object.</param>
2011 /// <param name="propertyName">The property name.</param>
2012 /// <since_tizen> 3 </since_tizen>
2013 public Property(Animatable arg0, string propertyName) : this(NDalicPINVOKE.new_Property__SWIG_2(Animatable.getCPtr(arg0), propertyName), true)
2015 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2019 /// This constructor creates a property instance.<br />
2020 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
2022 /// <param name="arg0">A valid handle to the target object.</param>
2023 /// <param name="propertyName">The property name.</param>
2024 /// <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>
2025 /// <since_tizen> 3 </since_tizen>
2026 public Property(Animatable arg0, string propertyName, int componentIndex) : this(NDalicPINVOKE.new_Property__SWIG_3(Animatable.getCPtr(arg0), propertyName, componentIndex), true)
2028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2031 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
2033 swigCMemOwn = cMemoryOwn;
2034 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
2039 if(!isDisposeQueued)
2041 isDisposeQueued = true;
2042 DisposeQueue.Instance.Add(this);
2047 /// Gets or sets the index of the property.
2049 /// <since_tizen> 3 </since_tizen>
2050 public int propertyIndex
2054 NDalicPINVOKE.Property_propertyIndex_set(swigCPtr, value);
2055 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2059 int ret = NDalicPINVOKE.Property_propertyIndex_get(swigCPtr);
2060 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2066 /// Gets or sets the component index of the property.
2068 /// <since_tizen> 3 </since_tizen>
2069 public int componentIndex
2073 NDalicPINVOKE.Property_componentIndex_set(swigCPtr, value);
2074 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2078 int ret = NDalicPINVOKE.Property_componentIndex_get(swigCPtr);
2079 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2084 internal static int INVALID_INDEX
2088 int ret = NDalicPINVOKE.Property_INVALID_INDEX_get();
2089 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2094 internal static int INVALID_KEY
2098 int ret = NDalicPINVOKE.Property_INVALID_KEY_get();
2099 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2104 internal static int INVALID_COMPONENT_INDEX
2108 int ret = NDalicPINVOKE.Property_INVALID_COMPONENT_INDEX_get();
2109 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2114 internal Animatable _object
2118 NDalicPINVOKE.Property__object_set(swigCPtr, Animatable.getCPtr(value));
2119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2123 Animatable ret = new Animatable(NDalicPINVOKE.Property__object_get(swigCPtr), false);
2124 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
2129 public void Dispose()
2131 //Throw excpetion if Dispose() is called in separate thread.
2132 if (!Window.IsInstalled())
2134 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
2137 if (isDisposeQueued)
2139 Dispose(DisposeTypes.Implicit);
2143 Dispose(DisposeTypes.Explicit);
2144 System.GC.SuppressFinalize(this);
2148 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
2150 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
2153 protected virtual void Dispose(DisposeTypes type)
2160 if(type == DisposeTypes.Explicit)
2163 //Release your own managed resources here.
2164 //You should release all of your own disposable objects here.
2167 //Release your own unmanaged resources here.
2168 //You should not access any managed member here except static instance.
2169 //because the execution order of Finalizes is non-deterministic.
2171 if (swigCPtr.Handle != global::System.IntPtr.Zero)
2175 swigCMemOwn = false;
2176 NDalicPINVOKE.delete_Property(swigCPtr);
2178 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);