2 * Copyright(c) 2019 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.
20 internal class Property : Disposable
24 /// This constructor creates a property instance.
26 /// <param name="arg0">A valid handle to the target object.</param>
27 /// <param name="propertyIndex">The index of a property.</param>
28 /// <since_tizen> 3 </since_tizen>
29 public Property(Animatable arg0, int propertyIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyIndex), true)
31 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
35 /// This constructor creates a property instance.
37 /// <param name="arg0">A valid handle to the target object.</param>
38 /// <param name="propertyIndex">The index of a property.</param>
39 /// <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>
40 /// <since_tizen> 3 </since_tizen>
41 public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true)
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
47 /// This constructor creates a property instance.<br />
48 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
50 /// <param name="arg0">A valid handle to the target object.</param>
51 /// <param name="propertyName">The property name.</param>
52 /// <since_tizen> 3 </since_tizen>
53 public Property(Animatable arg0, string propertyName) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyName), true)
55 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59 /// This constructor creates a property instance.<br />
60 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
62 /// <param name="arg0">A valid handle to the target object.</param>
63 /// <param name="propertyName">The property name.</param>
64 /// <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>
65 /// <since_tizen> 3 </since_tizen>
66 public Property(Animatable arg0, string propertyName, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyName, componentIndex), true)
68 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
71 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
76 /// Gets or sets the index of the property.
78 /// <since_tizen> 3 </since_tizen>
79 public int propertyIndex
83 Interop.Property.PropertyIndexSet(SwigCPtr, value);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 int ret = Interop.Property.PropertyIndexGet(SwigCPtr);
89 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 /// Gets or sets the component index of the property.
97 /// <since_tizen> 3 </since_tizen>
98 public int componentIndex
102 Interop.Property.ComponentIndexSet(SwigCPtr, value);
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 int ret = Interop.Property.ComponentIndexGet(SwigCPtr);
108 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 internal static int InvalidIndex
117 int ret = Interop.Property.InvalidIndexGet();
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123 internal static int InvalidKey
127 int ret = Interop.Property.InvalidKeyGet();
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 internal static int InvalidComponentIndex
137 int ret = Interop.Property.InvalidComponentIndexGet();
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
143 internal Animatable Object
147 Interop.Property.ObjectSet(SwigCPtr, Animatable.getCPtr(value));
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 Animatable ret = new Animatable(Interop.Property.ObjectGet(SwigCPtr), false);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
158 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
160 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
163 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
165 Interop.Property.DeleteProperty(swigCPtr);