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 public class Property : global::System.IDisposable
70 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
71 protected bool swigCMemOwn;
73 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
75 swigCMemOwn = cMemoryOwn;
76 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
79 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
81 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
84 //A Flag to check who called Dispose(). (By User or DisposeQueue)
85 private bool isDisposeQueued = false;
86 //A Flat to check if it is already disposed.
87 protected bool disposed = false;
94 isDisposeQueued = true;
95 DisposeQueue.Instance.Add(this);
101 //Throw excpetion if Dispose() is called in separate thread.
102 if (!Window.IsInstalled())
104 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
109 Dispose(DisposeTypes.Implicit);
113 Dispose(DisposeTypes.Explicit);
114 System.GC.SuppressFinalize(this);
118 protected virtual void Dispose(DisposeTypes type)
125 if (type == DisposeTypes.Explicit)
128 //Release your own managed resources here.
129 //You should release all of your own disposable objects here.
133 //Release your own unmanaged resources here.
134 //You should not access any managed member here except static instance.
135 //because the execution order of Finalizes is non-deterministic.
137 if (swigCPtr.Handle != global::System.IntPtr.Zero)
142 NDalicPINVOKE.delete_LinearConstrainer_Property(swigCPtr);
144 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
150 internal Property() : this(NDalicPINVOKE.new_LinearConstrainer_Property(), true)
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 internal static readonly int VALUE = NDalicPINVOKE.LinearConstrainer_Property_VALUE_get();
156 internal static readonly int PROGRESS = NDalicPINVOKE.LinearConstrainer_Property_PROGRESS_get();
159 public LinearConstrainer() : this(NDalicPINVOKE.LinearConstrainer_New(), true)
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
164 internal static LinearConstrainer DownCast(BaseHandle handle)
166 LinearConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as LinearConstrainer;
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 internal LinearConstrainer(LinearConstrainer handle) : this(NDalicPINVOKE.new_LinearConstrainer__SWIG_1(LinearConstrainer.getCPtr(handle)), true)
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
176 internal LinearConstrainer Assign(LinearConstrainer rhs)
178 LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.LinearConstrainer_Assign(swigCPtr, LinearConstrainer.getCPtr(rhs)), false);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 public void Apply(Property target, Property source, Vector2 range, Vector2 wrap)
185 NDalicPINVOKE.LinearConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189 public void Apply(Property target, Property source, Vector2 range)
191 NDalicPINVOKE.LinearConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range));
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
195 internal void Remove(Animatable target)
197 NDalicPINVOKE.LinearConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201 public PropertyArray Value
205 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
206 Tizen.NUI.Object.GetProperty(swigCPtr, LinearConstrainer.Property.VALUE).Get(temp);
211 Tizen.NUI.Object.SetProperty(swigCPtr, LinearConstrainer.Property.VALUE, new Tizen.NUI.PropertyValue(value));
214 public PropertyArray Progress
218 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
219 Tizen.NUI.Object.GetProperty(swigCPtr, LinearConstrainer.Property.PROGRESS).Get(temp);
224 Tizen.NUI.Object.SetProperty(swigCPtr, LinearConstrainer.Property.PROGRESS, new Tizen.NUI.PropertyValue(value));