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 public Property(Animatable arg0, int propertyIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyIndex), true)
30 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
34 /// This constructor creates a property instance.
36 /// <param name="arg0">A valid handle to the target object.</param>
37 /// <param name="propertyIndex">The index of a property.</param>
38 /// <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>
39 public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true)
41 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
45 /// This constructor creates a property instance.<br />
46 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
48 /// <param name="arg0">A valid handle to the target object.</param>
49 /// <param name="propertyName">The property name.</param>
50 public Property(Animatable arg0, string propertyName) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyName), true)
52 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 /// This constructor creates a property instance.<br />
57 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
59 /// <param name="arg0">A valid handle to the target object.</param>
60 /// <param name="propertyName">The property name.</param>
61 /// <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>
62 public Property(Animatable arg0, string propertyName, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyName, componentIndex), true)
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
72 /// Gets or sets the index of the property.
74 public int propertyIndex
78 Interop.Property.PropertyIndexSet(SwigCPtr, value);
79 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83 int ret = Interop.Property.PropertyIndexGet(SwigCPtr);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90 /// Gets or sets the component index of the property.
92 public int componentIndex
96 Interop.Property.ComponentIndexSet(SwigCPtr, value);
97 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 int ret = Interop.Property.ComponentIndexGet(SwigCPtr);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107 internal static int InvalidIndex
111 int ret = Interop.Property.InvalidIndexGet();
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 internal static int InvalidKey
121 int ret = Interop.Property.InvalidKeyGet();
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127 internal static int InvalidComponentIndex
131 int ret = Interop.Property.InvalidComponentIndexGet();
132 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137 internal Animatable Object
141 Interop.Property.ObjectSet(SwigCPtr, Animatable.getCPtr(value));
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146 Animatable ret = new Animatable(Interop.Property.ObjectGet(SwigCPtr), false);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
152 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
154 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
157 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
159 Interop.Property.DeleteProperty(swigCPtr);