a82f1d55d4620148d41312596d6912eb60ae0068
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Common / PropertyValue.cs
1 /*
2  * Copyright(c) 2019 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     /// <summary>
24     /// A value-type representing a property value.
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     public class PropertyValue : Disposable
28     {
29
30         /// <summary>
31         /// Creates a Size2D property value.
32         /// </summary>
33         /// <param name="vectorValue">Size2D values.</param>
34         /// <since_tizen> 3 </since_tizen>
35         public PropertyValue(Size2D vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector2(Size2D.getCPtr(vectorValue)), true)
36         {
37             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
38         }
39
40         /// <summary>
41         /// Creates a Position2D property value.
42         /// </summary>
43         /// <param name="vectorValue">Position2D values.</param>
44         /// <since_tizen> 3 </since_tizen>
45         public PropertyValue(Position2D vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector2(Position2D.getCPtr(vectorValue)), true)
46         {
47             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48         }
49
50         /// <summary>
51         /// Creates a Position property value.
52         /// </summary>
53         /// <param name="vectorValue">Position values.</param>
54         /// <since_tizen> 3 </since_tizen>
55         public PropertyValue(Position vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector3(Position.getCPtr(vectorValue)), true)
56         {
57             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58         }
59
60         /// <summary>
61         /// Creates a Color property value.
62         /// </summary>
63         /// <param name="vectorValue">Color values.</param>
64         /// <since_tizen> 3 </since_tizen>
65         public PropertyValue(Color vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector4(Color.getCPtr(vectorValue)), true)
66         {
67             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68         }
69
70         /// <summary>
71         /// The default constructor.
72         /// </summary>
73         /// <since_tizen> 3 </since_tizen>
74         public PropertyValue() : this(Interop.PropertyValue.NewPropertyValue(), true)
75         {
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77         }
78
79         /// <summary>
80         /// Creates a boolean property value.
81         /// </summary>
82         /// <param name="boolValue">A boolean value.</param>
83         /// <since_tizen> 3 </since_tizen>
84         public PropertyValue(bool boolValue) : this(Interop.PropertyValue.NewPropertyValue(boolValue), true)
85         {
86             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
87         }
88
89         /// <summary>
90         /// Creates an integer property value.
91         /// </summary>
92         /// <param name="integerValue">An integer value.</param>
93         /// <since_tizen> 3 </since_tizen>
94         public PropertyValue(int integerValue) : this(Interop.PropertyValue.NewPropertyValue(integerValue), true)
95         {
96             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97         }
98
99         /// <summary>
100         /// Creates a float property value.
101         /// </summary>
102         /// <param name="floatValue">A floating-point value.</param>
103         /// <since_tizen> 3 </since_tizen>
104         public PropertyValue(float floatValue) : this(Interop.PropertyValue.NewPropertyValue(floatValue), true)
105         {
106             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107         }
108
109         /// <summary>
110         /// Creates a Vector2 property value.
111         /// </summary>
112         /// <param name="vectorValue">A vector of 2 floating-point values.</param>
113         /// <since_tizen> 3 </since_tizen>
114         public PropertyValue(Vector2 vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector2(Vector2.getCPtr(vectorValue)), true)
115         {
116             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117         }
118
119         /// <summary>
120         /// Creates a Vector3 property value.
121         /// </summary>
122         /// <param name="vectorValue">A vector of 3 floating-point values.</param>
123         /// <since_tizen> 3 </since_tizen>
124         public PropertyValue(Vector3 vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector3(Vector3.getCPtr(vectorValue)), true)
125         {
126             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127         }
128
129         /// <summary>
130         /// Creates a Vector4 property value.
131         /// </summary>
132         /// <param name="vectorValue">A vector of 4 floating-point values.</param>
133         /// <since_tizen> 3 </since_tizen>
134         public PropertyValue(Vector4 vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector4(Vector4.getCPtr(vectorValue)), true)
135         {
136             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137         }
138
139         /// <summary>
140         /// Creates a Rectangle property value.
141         /// </summary>
142         /// <param name="vectorValue">Rectangle values.</param>
143         /// <since_tizen> 3 </since_tizen>
144         public PropertyValue(Rectangle vectorValue) : this(Interop.PropertyValue.NewPropertyValueRect(Rectangle.getCPtr(vectorValue)), true)
145         {
146             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147         }
148
149         /// <summary>
150         /// Creates a Rotation property value.
151         /// </summary>
152         /// <param name="quaternion">Rotation values.</param>
153         /// <since_tizen> 3 </since_tizen>
154         public PropertyValue(Rotation quaternion) : this(Interop.PropertyValue.NewPropertyValueQuaternion(Rotation.getCPtr(quaternion)), true)
155         {
156             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157         }
158
159         /// <summary>
160         /// Creates a string property value.
161         /// </summary>
162         /// <param name="stringValue">A string.</param>
163         /// <since_tizen> 3 </since_tizen>
164         public PropertyValue(string stringValue) : this(Interop.PropertyValue.NewPropertyValueString(stringValue), true)
165         {
166             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167         }
168
169         /// <summary>
170         /// Creates an array property value.
171         /// </summary>
172         /// <param name="arrayValue">An array.</param>
173         /// <since_tizen> 3 </since_tizen>
174         public PropertyValue(PropertyArray arrayValue) : this(Interop.PropertyValue.NewPropertyValueArray(PropertyArray.getCPtr(arrayValue)), true)
175         {
176             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177         }
178
179         /// <summary>
180         /// Creates a map property value.
181         /// </summary>
182         /// <param name="mapValue">An array.</param>
183         /// <since_tizen> 3 </since_tizen>
184         public PropertyValue(PropertyMap mapValue) : this(Interop.PropertyValue.NewPropertyValueMap(PropertyMap.getCPtr(mapValue)), true)
185         {
186             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187         }
188
189         /// <summary>
190         /// Creates a Extents value.
191         /// </summary>
192         /// <param name="extentsValue">A Extents value.</param>
193         /// <since_tizen> 4 </since_tizen>
194         public PropertyValue(Extents extentsValue) : this(Interop.PropertyValue.NewPropertyValueExtents(Extents.getCPtr(extentsValue)), true)
195         {
196             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197         }
198
199         /// <summary>
200         /// Creates a PropertyType value.
201         /// </summary>
202         /// <param name="type">A PropertyType value.</param>
203         /// <since_tizen> 3 </since_tizen>
204         public PropertyValue(PropertyType type) : this(Interop.PropertyValue.NewPropertyValueType((int)type), true)
205         {
206             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
207         }
208
209         /// <summary>
210         /// Creates a PropertyValue value.
211         /// </summary>
212         /// <param name="value">A PropertyValue value.</param>
213         /// <since_tizen> 3 </since_tizen>
214         public PropertyValue(PropertyValue value) : this(Interop.PropertyValue.NewPropertyValueValue(PropertyValue.getCPtr(value)), true)
215         {
216             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217         }
218
219         /// <summary>
220         /// Creates a Size property value.
221         /// </summary>
222         /// <param name="vectorValue">Size values.</param>
223         internal PropertyValue(Size vectorValue) : this(Interop.PropertyValue.NewPropertyValueVector3(Size.getCPtr(vectorValue)), true)
224         {
225             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226         }
227         internal PropertyValue(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
228         {
229         }
230
231         internal PropertyValue(Matrix3 matrixValue) : this(Interop.PropertyValue.NewPropertyValueMatrix3(Matrix3.getCPtr(matrixValue)), true)
232         {
233             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234         }
235
236         internal PropertyValue(Matrix matrixValue) : this(Interop.PropertyValue.NewPropertyValueMatrix(Matrix.getCPtr(matrixValue)), true)
237         {
238             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239         }
240
241         internal PropertyValue(AngleAxis angleAxis) : this(Interop.PropertyValue.NewPropertyValueAngleAxis(AngleAxis.getCPtr(angleAxis)), true)
242         {
243             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
244         }
245
246         /// <summary>
247         /// Determines whether the ProperyValue has equal value with the current ProperyValue.
248         /// </summary>
249         /// <remarks>
250         /// Equal only if same type.
251         /// PropertyArray and PropertyMap don't have EqaulTo method. In that case, always return false.
252         /// EqualTo API consider absolute/relative error internally.
253         /// </remarks>
254         /// <param name="rhs">The ProperyValue to compare with the current ProperyValue.</param>
255         /// <returns>true if the specified ProperyValue is equal to the current ProperyValue; otherwise, false.</returns>
256         [EditorBrowsable(EditorBrowsableState.Never)]
257         public bool EqualTo(PropertyValue rhs)
258         {
259             bool ret = Interop.PropertyValue.EqualTo(SwigCPtr, PropertyValue.getCPtr(rhs));
260             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261             return ret;
262         }
263
264         /// <summary>
265         /// Determines whether the ProperyValue doesn't have equal value with the current ProperyValue.
266         /// </summary>
267         /// <remarks>
268         /// Same as !EqualTo(rhs);
269         /// </remarks>
270         /// <param name="rhs">The ProperyValue to compare with the current ProperyValue.</param>
271         /// <returns>true if the specified ProperyValue is not equal to the current ProperyValue; otherwise, false.</returns>
272         [EditorBrowsable(EditorBrowsableState.Never)]
273         public bool NotEqualTo(PropertyValue rhs)
274         {
275             bool ret = Interop.PropertyValue.NotEqualTo(SwigCPtr, PropertyValue.getCPtr(rhs));
276             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277             return ret;
278         }
279
280         /// <summary>
281         /// Hidden API (Inhouse API).
282         /// Dispose. 
283         /// </summary>
284         /// <remarks>
285         /// Following the guide of https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose.
286         /// This will replace "protected virtual void Dispose(DisposeTypes type)" which is exactly same in functionality.
287         /// </remarks>
288         /// <param name="disposing">true in order to free managed objects</param>
289         // Protected implementation of Dispose pattern.
290         [EditorBrowsable(EditorBrowsableState.Never)]
291         protected override void Dispose(bool disposing)
292         {
293             if (disposed)
294             {
295                 return;
296             }
297
298             //perform dipose here without being added to DisposeQueue.
299             if (SwigCMemOwn && SwigCPtr.Handle != IntPtr.Zero)
300             {
301                 if (disposing)
302                 {
303                     base.Dispose(DisposeTypes.Explicit);
304                 }
305                 else
306                 {
307                     base.Dispose(DisposeTypes.Implicit);
308                 }
309             }
310
311             base.Dispose(disposing);
312         }
313
314
315
316         /// <summary>
317         /// An extension to the property value class that allows us to create a
318         /// Property value from a C# object, for example, integer, float, or string.<br />
319         /// </summary>
320         /// <param name="obj">An object to create.</param>
321         /// <returns>The created value.</returns>
322         /// <exception cref="global::System.ArgumentNullException"> Thrown when obj is null. </exception>
323         /// <since_tizen> 3 </since_tizen>
324         static public PropertyValue CreateFromObject(System.Object obj)
325         {
326             if (null == obj)
327             {
328                 throw new global::System.ArgumentNullException(nameof(obj));
329             }
330
331             System.Type type = obj.GetType();
332             PropertyValue value;
333             if (type.IsEnum)
334             {
335                 value = new PropertyValue((int)obj);//Enum.Parse(type, str);
336             }
337             else if (type.Equals(typeof(int)))
338             {
339                 value = new PropertyValue((int)obj);
340             }
341             else if (type.Equals(typeof(System.Int32)))
342             {
343                 value = new PropertyValue((int)obj);
344             }
345             else if (type.Equals(typeof(bool)))
346             {
347                 value = new PropertyValue((bool)obj);
348             }
349             else if (type.Equals(typeof(float)))
350             {
351                 value = new PropertyValue((float)obj);
352             }
353             else if (type.Equals(typeof(string)))
354             {
355                 value = new PropertyValue((string)obj);
356             }
357             else if (type.Equals(typeof(Vector2)))
358             {
359                 value = new PropertyValue((Vector2)obj);
360             }
361             else if (type.Equals(typeof(Vector3)))
362             {
363                 value = new PropertyValue((Vector3)obj);
364             }
365             else if (type.Equals(typeof(Vector4)))
366             {
367                 value = new PropertyValue((Vector4)obj);
368             }
369             else if (type.Equals(typeof(Position)))
370             {
371                 value = new PropertyValue((Position)obj);
372             }
373             else if (type.Equals(typeof(Position2D)))
374             {
375                 value = new PropertyValue((Position2D)obj);
376             }
377             else if (type.Equals(typeof(Size)))
378             {
379                 value = new PropertyValue((Size)obj);
380             }
381             else if (type.Equals(typeof(Size2D)))
382             {
383                 value = new PropertyValue((Size2D)obj);
384             }
385             else if (type.Equals(typeof(Color)))
386             {
387                 value = new PropertyValue((Color)obj);
388             }
389             else if (type.Equals(typeof(Rotation)))
390             {
391                 value = new PropertyValue((Rotation)obj);
392             }
393             else if (type.Equals(typeof(RelativeVector2)))
394             {
395                 value = new PropertyValue((RelativeVector2)obj);
396             }
397             else if (type.Equals(typeof(RelativeVector3)))
398             {
399                 value = new PropertyValue((RelativeVector3)obj);
400             }
401             else if (type.Equals(typeof(RelativeVector4)))
402             {
403                 value = new PropertyValue((RelativeVector4)obj);
404             }
405             else if (type.Equals(typeof(Extents)))
406             {
407                 value = new PropertyValue((Extents)obj);
408             }
409             else if (type.Equals(typeof(Rectangle)))
410             {
411                 value = new PropertyValue((Rectangle)obj);
412             }
413             else
414             {
415                 throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
416             }
417             return value;
418         }
419
420         /// <summary>
421         /// Retrieves a Size2D value.
422         /// </summary>
423         /// <param name="vectorValue"> On return, a Size2D value.</param>
424         /// <since_tizen> 3 </since_tizen>
425         public bool Get(Size2D vectorValue)
426         {
427             bool ret = Interop.PropertyValue.GetVector2(SwigCPtr, Size2D.getCPtr(vectorValue));
428             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
429             return ret;
430         }
431
432         /// <summary>
433         /// Retrieves a Position2D value.
434         /// </summary>
435         /// <param name="vectorValue"> On return, a Position2D value.</param>
436         /// <since_tizen> 3 </since_tizen>
437         public bool Get(Position2D vectorValue)
438         {
439             bool ret = Interop.PropertyValue.GetVector2(SwigCPtr, Position2D.getCPtr(vectorValue));
440             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
441             return ret;
442         }
443
444         /// <summary>
445         /// Retrieves a Size value.
446         /// </summary>
447         /// <param name="vectorValue"> On return, a size value.</param>
448         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
449         [EditorBrowsable(EditorBrowsableState.Never)]
450         public bool Get(Size vectorValue)
451         {
452             bool ret = Interop.PropertyValue.GetVector3(SwigCPtr, Size.getCPtr(vectorValue));
453             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
454             return ret;
455         }
456
457         /// <summary>
458         /// Retrieves a Position value.
459         /// </summary>
460         /// <param name="vectorValue"> On return, a position value.</param>
461         /// <since_tizen> 3 </since_tizen>
462         public bool Get(Position vectorValue)
463         {
464             bool ret = Interop.PropertyValue.GetVector3(SwigCPtr, Position.getCPtr(vectorValue));
465             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
466             return ret;
467         }
468
469         /// <summary>
470         /// Retrieves a Color value.
471         /// </summary>
472         /// <param name="vectorValue"> On return, a color value.</param>
473         /// <since_tizen> 3 </since_tizen>
474         public bool Get(Color vectorValue)
475         {
476             bool ret = Interop.PropertyValue.GetVector4(SwigCPtr, Color.getCPtr(vectorValue));
477             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
478             return ret;
479         }
480
481         /// <summary>
482         /// Queries the type of this property value.
483         /// </summary>
484         /// <returns>The type ID</returns>
485         /// <since_tizen> 3 </since_tizen>
486         public new PropertyType GetType()
487         {
488             PropertyType ret = (PropertyType)Interop.PropertyValue.PropertyValueGetType(SwigCPtr);
489             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
490             return ret;
491         }
492
493         /// <summary>
494         /// Retrieves a boolean value.
495         /// </summary>
496         /// <param name="boolValue">On return, a boolean value.</param>
497         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
498         /// <since_tizen> 3 </since_tizen>
499         public bool Get(out bool boolValue)
500         {
501             bool ret = Interop.PropertyValue.PropertyValueGet(SwigCPtr, out boolValue);
502             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
503             return ret;
504         }
505
506         /// <summary>
507         /// Retrieves a floating-point value.
508         /// </summary>
509         /// <param name="floatValue">On return, a floating-point value.</param>
510         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
511         /// <since_tizen> 3 </since_tizen>
512         public bool Get(out float floatValue)
513         {
514             bool ret = Interop.PropertyValue.PropertyValueGet(SwigCPtr, out floatValue);
515             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
516             return ret;
517         }
518
519         /// <summary>
520         /// Retrieves an integer value.
521         /// </summary>
522         /// <param name="integerValue">On return, an integer value.</param>
523         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
524         /// <since_tizen> 3 </since_tizen>
525         public bool Get(out int integerValue)
526         {
527             bool ret = Interop.PropertyValue.PropertyValueGet(SwigCPtr, out integerValue);
528             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
529             return ret;
530         }
531
532         /// <summary>
533         /// Retrieves an integer rectangle.
534         /// </summary>
535         /// <param name="rect">On return, an integer rectangle.</param>
536         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
537         /// <since_tizen> 3 </since_tizen>
538         public bool Get(Rectangle rect)
539         {
540             bool ret = Interop.PropertyValue.GetRect(SwigCPtr, Rectangle.getCPtr(rect));
541             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542             return ret;
543         }
544
545         /// <summary>
546         /// Retrieves a vector value.
547         /// </summary>
548         /// <param name="vectorValue">On return, a vector value.</param>
549         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
550         /// <since_tizen> 3 </since_tizen>
551         public bool Get(Vector2 vectorValue)
552         {
553             bool ret = Interop.PropertyValue.GetVector2(SwigCPtr, Vector2.getCPtr(vectorValue));
554             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555             return ret;
556         }
557
558         /// <summary>
559         /// Retrieves a vector value.
560         /// </summary>
561         /// <param name="vectorValue">On return, a vector value.</param>
562         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
563         /// <since_tizen> 3 </since_tizen>
564         public bool Get(Vector3 vectorValue)
565         {
566             bool ret = Interop.PropertyValue.GetVector3(SwigCPtr, Vector3.getCPtr(vectorValue));
567             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568             return ret;
569         }
570
571         /// <summary>
572         /// Retrieves a vector value.
573         /// </summary>
574         /// <param name="vectorValue">On return, a vector value.</param>
575         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
576         /// <since_tizen> 3 </since_tizen>
577         public bool Get(Vector4 vectorValue)
578         {
579             bool ret = Interop.PropertyValue.GetVector4(SwigCPtr, Vector4.getCPtr(vectorValue));
580             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581             return ret;
582         }
583
584         /// <summary>
585         /// Retrieves a vector value.
586         /// </summary>
587         /// <param name="vectorValue">On return, a vector value.</param>
588         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
589         /// <since_tizen> 5 </since_tizen>
590         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
591         [EditorBrowsable(EditorBrowsableState.Never)]
592         public bool Get(RelativeVector2 vectorValue)
593         {
594             bool ret = Interop.PropertyValue.GetVector2(SwigCPtr, RelativeVector2.getCPtr(vectorValue));
595             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596             return ret;
597         }
598
599         /// <summary>
600         /// Retrieves a vector value.
601         /// </summary>
602         /// <param name="vectorValue">On return, a vector value.</param>
603         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
604         /// <since_tizen> 5 </since_tizen>
605         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
606         [EditorBrowsable(EditorBrowsableState.Never)]
607         public bool Get(RelativeVector3 vectorValue)
608         {
609             bool ret = Interop.PropertyValue.GetVector3(SwigCPtr, RelativeVector3.getCPtr(vectorValue));
610             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
611             return ret;
612         }
613
614         /// <summary>
615         /// Retrieves a vector value.
616         /// </summary>
617         /// <param name="vectorValue">On return, a vector value.</param>
618         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
619         /// <since_tizen> 5 </since_tizen>
620         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
621         [EditorBrowsable(EditorBrowsableState.Never)]
622         public bool Get(RelativeVector4 vectorValue)
623         {
624             bool ret = Interop.PropertyValue.GetVector4(SwigCPtr, RelativeVector4.getCPtr(vectorValue));
625             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
626             return ret;
627         }
628
629         /// <summary>
630         /// Retrieves a rotation value.
631         /// </summary>
632         /// <param name="quaternionValue">On return, a rotation value.</param>
633         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
634         /// <since_tizen> 3 </since_tizen>
635         public bool Get(Rotation quaternionValue)
636         {
637             bool ret = Interop.PropertyValue.GetQuaternion(SwigCPtr, Rotation.getCPtr(quaternionValue));
638             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
639             return ret;
640         }
641
642         /// <summary>
643         /// Retrieves a string property value.
644         /// </summary>
645         /// <param name="stringValue">On return, a string.</param>
646         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
647         /// <since_tizen> 3 </since_tizen>
648         public bool Get(out string stringValue)
649         {
650             bool ret = Interop.PropertyValue.GetString(SwigCPtr, out stringValue);
651             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652             return ret;
653         }
654
655         /// <summary>
656         /// Retrieves an array property value.
657         /// </summary>
658         /// <param name="arrayValue">On return, the array as a vector property values.</param>
659         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
660         /// <since_tizen> 3 </since_tizen>
661         public bool Get(PropertyArray arrayValue)
662         {
663             bool ret = Interop.PropertyValue.GetArray(SwigCPtr, PropertyArray.getCPtr(arrayValue));
664             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
665             return ret;
666         }
667
668         /// <summary>
669         /// Retrieves a map property value.
670         /// </summary>
671         /// <param name="mapValue">On return, the map as vector of string and property value pairs.</param>
672         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
673         /// <since_tizen> 3 </since_tizen>
674         public bool Get(PropertyMap mapValue)
675         {
676             bool ret = Interop.PropertyValue.GetMap(SwigCPtr, PropertyMap.getCPtr(mapValue));
677             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
678             return ret;
679         }
680
681         /// <summary>
682         /// Retrieves a map property value.
683         /// </summary>
684         /// <param name="mapValue">On return, the map as vector of string and property value pairs.</param>
685         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
686         [EditorBrowsable(EditorBrowsableState.Never)]
687         public bool Get(ref PropertyMap mapValue)
688         {
689             if (mapValue == null)
690             {
691                 return false;
692             }
693             bool ret = Interop.PropertyValue.GetMap(SwigCPtr, mapValue.SwigCPtr);
694             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695             return ret;
696         }
697
698         /// <summary>
699         /// Retrieves a Extents value.
700         /// </summary>
701         /// <param name="extentsValue">On return, a extents.</param>
702         /// <returns>Returns true if the value is successfully retrieved, false if the type is not convertible.</returns>
703         /// <since_tizen> 4 </since_tizen>
704         public bool Get(Extents extentsValue)
705         {
706             bool ret = Interop.PropertyValue.GetExtents(SwigCPtr, Extents.getCPtr(extentsValue));
707             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
708             return ret;
709         }
710
711         internal bool Get(Matrix3 matrixValue)
712         {
713             bool ret = Interop.PropertyValue.GetMatrix3(SwigCPtr, Matrix3.getCPtr(matrixValue));
714             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
715             return ret;
716         }
717
718         internal bool Get(Matrix matrixValue)
719         {
720             bool ret = Interop.PropertyValue.GetMatrix(SwigCPtr, Matrix.getCPtr(matrixValue));
721             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
722             return ret;
723         }
724
725         internal bool Get(AngleAxis angleAxisValue)
726         {
727             bool ret = Interop.PropertyValue.GetAngleAxis(SwigCPtr, AngleAxis.getCPtr(angleAxisValue));
728             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
729             return ret;
730         }
731
732         /// This will not be public opened.
733         [EditorBrowsable(EditorBrowsableState.Never)]
734         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
735         {
736             Interop.PropertyValue.DeletePropertyValue(swigCPtr);
737         }
738
739         internal static PropertyValue CreateWithGuard(string value)
740         {
741             return value == null ? new PropertyValue() : new PropertyValue(value);
742         }
743
744         internal static PropertyValue CreateWithGuard(Vector2 value)
745         {
746             return value == null ? new PropertyValue() : new PropertyValue(value);
747         }
748
749         internal static PropertyValue CreateWithGuard(Rectangle value)
750         {
751             return value == null ? new PropertyValue() : new PropertyValue(value);
752         }
753
754         internal static PropertyValue CreateWithGuard(Color value)
755         {
756             return value == null ? new PropertyValue() : new PropertyValue(value);
757         }
758     }
759 }