2 * Copyright(c) 2021 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
23 /// This constructor creates a property instance.
25 /// <param name="arg0">A valid handle to the target object.</param>
26 /// <param name="propertyIndex">The index of a property.</param>
27 public Property(Animatable arg0, int propertyIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyIndex), true)
29 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
33 /// This constructor creates a property instance.
35 /// <param name="arg0">A valid handle to the target object.</param>
36 /// <param name="propertyIndex">The index of a property.</param>
37 /// <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>
38 public Property(Animatable arg0, int propertyIndex, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyIndex, componentIndex), true)
40 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44 /// This constructor creates a property instance.<br />
45 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
47 /// <param name="arg0">A valid handle to the target object.</param>
48 /// <param name="propertyName">The property name.</param>
49 public Property(Animatable arg0, string propertyName) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyName), true)
51 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55 /// This constructor creates a property instance.<br />
56 /// This performs a property index query and is therefore slower than constructing a property directly with the index.<br />
58 /// <param name="arg0">A valid handle to the target object.</param>
59 /// <param name="propertyName">The property name.</param>
60 /// <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>
61 public Property(Animatable arg0, string propertyName, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(arg0), propertyName, componentIndex), true)
63 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
66 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
71 /// Gets or sets the index of the property.
73 public int propertyIndex
77 Interop.Property.PropertyIndexSet(SwigCPtr, value);
78 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82 int ret = Interop.Property.PropertyIndexGet(SwigCPtr);
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89 /// Gets or sets the component index of the property.
91 public int componentIndex
95 Interop.Property.ComponentIndexSet(SwigCPtr, value);
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 int ret = Interop.Property.ComponentIndexGet(SwigCPtr);
101 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 internal static int InvalidIndex
110 int ret = Interop.Property.InvalidIndexGet();
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 internal static int InvalidKey
120 int ret = Interop.Property.InvalidKeyGet();
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 internal static int InvalidComponentIndex
130 int ret = Interop.Property.InvalidComponentIndexGet();
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 internal Animatable Object
140 Interop.Property.ObjectSet(SwigCPtr, Animatable.getCPtr(value));
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 Animatable ret = new Animatable(Interop.Property.ObjectGet(SwigCPtr), false);
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
153 Interop.Property.DeleteProperty(swigCPtr);