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)
59 NDalicPINVOKE.delete_PathConstrainer(swigCPtr);
61 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69 public class Property : global::System.IDisposable
71 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
72 protected bool swigCMemOwn;
74 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
76 swigCMemOwn = cMemoryOwn;
77 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
80 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
82 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
85 //A Flag to check who called Dispose(). (By User or DisposeQueue)
86 private bool isDisposeQueued = false;
87 //A Flat to check if it is already disposed.
88 protected bool disposed = false;
95 isDisposeQueued = true;
96 DisposeQueue.Instance.Add(this);
100 public void Dispose()
102 //Throw excpetion if Dispose() is called in separate thread.
103 if (!Window.IsInstalled())
105 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
110 Dispose(DisposeTypes.Implicit);
114 Dispose(DisposeTypes.Explicit);
115 System.GC.SuppressFinalize(this);
119 protected virtual void Dispose(DisposeTypes type)
126 if (type == DisposeTypes.Explicit)
129 //Release your own managed resources here.
130 //You should release all of your own disposable objects here.
134 //Release your own unmanaged resources here.
135 //You should not access any managed member here except static instance.
136 //because the execution order of Finalizes is non-deterministic.
138 if (swigCPtr.Handle != global::System.IntPtr.Zero)
143 NDalicPINVOKE.delete_PathConstrainer_Property(swigCPtr);
145 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
151 public Property() : this(NDalicPINVOKE.new_PathConstrainer_Property(), true)
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 internal static readonly int FORWARD = NDalicPINVOKE.PathConstrainer_Property_FORWARD_get();
157 internal static readonly int POINTS = NDalicPINVOKE.PathConstrainer_Property_POINTS_get();
158 internal static readonly int CONTROL_POINTS = NDalicPINVOKE.PathConstrainer_Property_CONTROL_POINTS_get();
162 public PathConstrainer() : this(NDalicPINVOKE.PathConstrainer_New(), true)
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public static PathConstrainer DownCast(BaseHandle handle)
169 PathConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PathConstrainer;
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 internal PathConstrainer(PathConstrainer handle) : this(NDalicPINVOKE.new_PathConstrainer__SWIG_1(PathConstrainer.getCPtr(handle)), true)
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
179 internal PathConstrainer Assign(PathConstrainer rhs)
181 PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_Assign(swigCPtr, PathConstrainer.getCPtr(rhs)), false);
182 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 public void Apply(Property target, Property source, Vector2 range, Vector2 wrap)
188 NDalicPINVOKE.PathConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
192 public void Apply(Property target, Property source, Vector2 range)
194 NDalicPINVOKE.PathConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range));
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 internal void Remove(Animatable target)
200 NDalicPINVOKE.PathConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 public Vector3 Forward
208 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
209 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.FORWARD).Get(temp);
214 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.FORWARD, new Tizen.NUI.PropertyValue(value));
218 public PropertyArray Points
222 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
223 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.POINTS).Get(temp);
228 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.POINTS, new Tizen.NUI.PropertyValue(value));
232 public PropertyArray ControlPoints
236 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
237 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS).Get(temp);
242 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS, new Tizen.NUI.PropertyValue(value));