1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
20 internal class PathConstrainer : BaseHandle
22 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
24 internal PathConstrainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PathConstrainer_SWIGUpcast(cPtr), cMemoryOwn)
26 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
29 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PathConstrainer obj)
31 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
34 protected override void Dispose(DisposeTypes type)
41 if (type == DisposeTypes.Explicit)
44 //Release your own managed resources here.
45 //You should release all of your own disposable objects here.
49 //Release your own unmanaged resources here.
50 //You should not access any managed member here except static instance.
51 //because the execution order of Finalizes is non-deterministic.
54 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 //Unreference this instance from Registry.
61 Registry.Unregister(this);
63 NDalicPINVOKE.delete_PathConstrainer(swigCPtr);
65 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
73 public class Property : global::System.IDisposable
75 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
76 protected bool swigCMemOwn;
78 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
80 swigCMemOwn = cMemoryOwn;
81 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
84 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
86 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
89 //A Flag to check who called Dispose(). (By User or DisposeQueue)
90 private bool isDisposeQueued = false;
91 //A Flat to check if it is already disposed.
92 protected bool disposed = false;
99 isDisposeQueued = true;
100 DisposeQueue.Instance.Add(this);
104 public void Dispose()
106 //Throw excpetion if Dispose() is called in separate thread.
107 if (!Window.IsInstalled())
109 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
114 Dispose(DisposeTypes.Implicit);
118 Dispose(DisposeTypes.Explicit);
119 System.GC.SuppressFinalize(this);
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_PathConstrainer_Property(swigCPtr);
149 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
155 public Property() : this(NDalicPINVOKE.new_PathConstrainer_Property(), true)
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 internal static readonly int FORWARD = NDalicPINVOKE.PathConstrainer_Property_FORWARD_get();
161 internal static readonly int POINTS = NDalicPINVOKE.PathConstrainer_Property_POINTS_get();
162 internal static readonly int CONTROL_POINTS = NDalicPINVOKE.PathConstrainer_Property_CONTROL_POINTS_get();
166 public PathConstrainer() : this(NDalicPINVOKE.PathConstrainer_New(), true)
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 public new static PathConstrainer DownCast(BaseHandle handle)
173 PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_DownCast(BaseHandle.getCPtr(handle)), true);
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 internal PathConstrainer(PathConstrainer handle) : this(NDalicPINVOKE.new_PathConstrainer__SWIG_1(PathConstrainer.getCPtr(handle)), true)
180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 internal PathConstrainer Assign(PathConstrainer rhs)
185 PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_Assign(swigCPtr, PathConstrainer.getCPtr(rhs)), false);
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 public void Apply(Property target, Property source, Vector2 range, Vector2 wrap)
192 NDalicPINVOKE.PathConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196 public void Apply(Property target, Property source, Vector2 range)
198 NDalicPINVOKE.PathConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range));
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
202 internal void Remove(Animatable target)
204 NDalicPINVOKE.PathConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208 public Vector3 Forward
212 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
213 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.FORWARD).Get(temp);
218 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.FORWARD, new Tizen.NUI.PropertyValue(value));
222 public PropertyArray Points
226 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
227 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.POINTS).Get(temp);
232 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.POINTS, new Tizen.NUI.PropertyValue(value));
236 public PropertyArray ControlPoints
240 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
241 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS).Get(temp);
246 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS, new Tizen.NUI.PropertyValue(value));