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.
21 internal class LinearConstrainer : BaseHandle
23 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25 internal LinearConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.LinearConstrainer_SWIGUpcast(cPtr), cMemoryOwn)
27 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(LinearConstrainer obj)
32 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
35 protected override void Dispose(DisposeTypes type)
42 if (type == DisposeTypes.Explicit)
45 //Release your own managed resources here.
46 //You should release all of your own disposable objects here.
50 //Release your own unmanaged resources here.
51 //You should not access any managed member here except static instance.
52 //because the execution order of Finalizes is non-deterministic.
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 NDalicPINVOKE.delete_LinearConstrainer(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
68 /// <since_tizen> 3 </since_tizen>
69 public class Property : global::System.IDisposable
71 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
72 /// <since_tizen> 3 </since_tizen>
73 protected bool swigCMemOwn;
75 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
77 swigCMemOwn = cMemoryOwn;
78 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
81 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
83 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
86 //A Flag to check who called Dispose(). (By User or DisposeQueue)
87 private bool isDisposeQueued = false;
88 //A Flat to check if it is already disposed.
89 /// <since_tizen> 3 </since_tizen>
90 protected bool disposed = false;
97 isDisposeQueued = true;
98 DisposeQueue.Instance.Add(this);
102 /// <since_tizen> 3 </since_tizen>
103 public void Dispose()
105 //Throw excpetion if Dispose() is called in separate thread.
106 if (!Window.IsInstalled())
108 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
113 Dispose(DisposeTypes.Implicit);
117 Dispose(DisposeTypes.Explicit);
118 System.GC.SuppressFinalize(this);
122 /// <since_tizen> 3 </since_tizen>
123 protected virtual void Dispose(DisposeTypes type)
130 if (type == DisposeTypes.Explicit)
133 //Release your own managed resources here.
134 //You should release all of your own disposable objects here.
138 //Release your own unmanaged resources here.
139 //You should not access any managed member here except static instance.
140 //because the execution order of Finalizes is non-deterministic.
142 if (swigCPtr.Handle != global::System.IntPtr.Zero)
147 NDalicPINVOKE.delete_LinearConstrainer_Property(swigCPtr);
149 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
155 internal Property() : this(NDalicPINVOKE.new_LinearConstrainer_Property(), true)
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 internal static readonly int VALUE = NDalicPINVOKE.LinearConstrainer_Property_VALUE_get();
161 internal static readonly int PROGRESS = NDalicPINVOKE.LinearConstrainer_Property_PROGRESS_get();
164 public LinearConstrainer() : this(NDalicPINVOKE.LinearConstrainer_New(), true)
166 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 internal static LinearConstrainer DownCast(BaseHandle handle)
171 LinearConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as LinearConstrainer;
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 internal LinearConstrainer(LinearConstrainer handle) : this(NDalicPINVOKE.new_LinearConstrainer__SWIG_1(LinearConstrainer.getCPtr(handle)), true)
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 internal LinearConstrainer Assign(LinearConstrainer rhs)
183 LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.LinearConstrainer_Assign(swigCPtr, LinearConstrainer.getCPtr(rhs)), false);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public void Apply(Property target, Property source, Vector2 range, Vector2 wrap)
190 NDalicPINVOKE.LinearConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public void Apply(Property target, Property source, Vector2 range)
196 NDalicPINVOKE.LinearConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range));
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 internal void Remove(Animatable target)
202 NDalicPINVOKE.LinearConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 public PropertyArray Value
210 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
211 Tizen.NUI.Object.GetProperty(swigCPtr, LinearConstrainer.Property.VALUE).Get(temp);
216 Tizen.NUI.Object.SetProperty(swigCPtr, LinearConstrainer.Property.VALUE, new Tizen.NUI.PropertyValue(value));
219 public PropertyArray Progress
223 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
224 Tizen.NUI.Object.GetProperty(swigCPtr, LinearConstrainer.Property.PROGRESS).Get(temp);
229 Tizen.NUI.Object.SetProperty(swigCPtr, LinearConstrainer.Property.PROGRESS, new Tizen.NUI.PropertyValue(value));