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 PathConstrainer : BaseHandle
23 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25 internal PathConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PathConstrainer_SWIGUpcast(cPtr), cMemoryOwn)
27 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
30 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PathConstrainer 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_PathConstrainer(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
70 public class Property : global::System.IDisposable
72 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
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 protected bool disposed = false;
96 isDisposeQueued = true;
97 DisposeQueue.Instance.Add(this);
101 public void Dispose()
103 //Throw excpetion if Dispose() is called in separate thread.
104 if (!Window.IsInstalled())
106 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
111 Dispose(DisposeTypes.Implicit);
115 Dispose(DisposeTypes.Explicit);
116 System.GC.SuppressFinalize(this);
120 protected virtual void Dispose(DisposeTypes type)
127 if (type == DisposeTypes.Explicit)
130 //Release your own managed resources here.
131 //You should release all of your own disposable objects here.
135 //Release your own unmanaged resources here.
136 //You should not access any managed member here except static instance.
137 //because the execution order of Finalizes is non-deterministic.
139 if (swigCPtr.Handle != global::System.IntPtr.Zero)
144 NDalicPINVOKE.delete_PathConstrainer_Property(swigCPtr);
146 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
152 public Property() : this(NDalicPINVOKE.new_PathConstrainer_Property(), true)
154 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 internal static readonly int FORWARD = NDalicPINVOKE.PathConstrainer_Property_FORWARD_get();
158 internal static readonly int POINTS = NDalicPINVOKE.PathConstrainer_Property_POINTS_get();
159 internal static readonly int CONTROL_POINTS = NDalicPINVOKE.PathConstrainer_Property_CONTROL_POINTS_get();
163 public PathConstrainer() : this(NDalicPINVOKE.PathConstrainer_New(), true)
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
168 public static PathConstrainer DownCast(BaseHandle handle)
170 PathConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PathConstrainer;
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 internal PathConstrainer(PathConstrainer handle) : this(NDalicPINVOKE.new_PathConstrainer__SWIG_1(PathConstrainer.getCPtr(handle)), true)
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180 internal PathConstrainer Assign(PathConstrainer rhs)
182 PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_Assign(swigCPtr, PathConstrainer.getCPtr(rhs)), false);
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public void Apply(Property target, Property source, Vector2 range, Vector2 wrap)
189 NDalicPINVOKE.PathConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 public void Apply(Property target, Property source, Vector2 range)
195 NDalicPINVOKE.PathConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range));
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 internal void Remove(Animatable target)
201 NDalicPINVOKE.PathConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 public Vector3 Forward
209 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
210 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.FORWARD).Get(temp);
215 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.FORWARD, new Tizen.NUI.PropertyValue(value));
219 public PropertyArray Points
223 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
224 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.POINTS).Get(temp);
229 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.POINTS, new Tizen.NUI.PropertyValue(value));
233 public PropertyArray ControlPoints
237 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
238 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS).Get(temp);
243 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS, new Tizen.NUI.PropertyValue(value));