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 /// <since_tizen> 3 </since_tizen>
71 public class Property : global::System.IDisposable
73 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
74 /// <since_tizen> 3 </since_tizen>
75 protected bool swigCMemOwn;
77 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
79 swigCMemOwn = cMemoryOwn;
80 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
83 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
85 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
88 //A Flag to check who called Dispose(). (By User or DisposeQueue)
89 private bool isDisposeQueued = false;
90 //A Flat to check if it is already disposed.
91 /// <since_tizen> 3 </since_tizen>
92 protected bool disposed = false;
99 isDisposeQueued = true;
100 DisposeQueue.Instance.Add(this);
104 /// <since_tizen> 3 </since_tizen>
105 public void Dispose()
107 //Throw excpetion if Dispose() is called in separate thread.
108 if (!Window.IsInstalled())
110 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
115 Dispose(DisposeTypes.Implicit);
119 Dispose(DisposeTypes.Explicit);
120 System.GC.SuppressFinalize(this);
124 /// <since_tizen> 3 </since_tizen>
125 protected virtual void Dispose(DisposeTypes type)
132 if (type == DisposeTypes.Explicit)
135 //Release your own managed resources here.
136 //You should release all of your own disposable objects here.
140 //Release your own unmanaged resources here.
141 //You should not access any managed member here except static instance.
142 //because the execution order of Finalizes is non-deterministic.
144 if (swigCPtr.Handle != global::System.IntPtr.Zero)
149 NDalicPINVOKE.delete_PathConstrainer_Property(swigCPtr);
151 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
157 /// <since_tizen> 3 </since_tizen>
158 public Property() : this(NDalicPINVOKE.new_PathConstrainer_Property(), true)
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 internal static readonly int FORWARD = NDalicPINVOKE.PathConstrainer_Property_FORWARD_get();
164 internal static readonly int POINTS = NDalicPINVOKE.PathConstrainer_Property_POINTS_get();
165 internal static readonly int CONTROL_POINTS = NDalicPINVOKE.PathConstrainer_Property_CONTROL_POINTS_get();
169 public PathConstrainer() : this(NDalicPINVOKE.PathConstrainer_New(), true)
171 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 public static PathConstrainer DownCast(BaseHandle handle)
176 PathConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PathConstrainer;
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181 internal PathConstrainer(PathConstrainer handle) : this(NDalicPINVOKE.new_PathConstrainer__SWIG_1(PathConstrainer.getCPtr(handle)), true)
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 internal PathConstrainer Assign(PathConstrainer rhs)
188 PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_Assign(swigCPtr, PathConstrainer.getCPtr(rhs)), false);
189 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 public void Apply(Property target, Property source, Vector2 range, Vector2 wrap)
195 NDalicPINVOKE.PathConstrainer_Apply__SWIG_0(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range), Vector2.getCPtr(wrap));
196 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 public void Apply(Property target, Property source, Vector2 range)
201 NDalicPINVOKE.PathConstrainer_Apply__SWIG_1(swigCPtr, Property.getCPtr(target), Property.getCPtr(source), Vector2.getCPtr(range));
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205 internal void Remove(Animatable target)
207 NDalicPINVOKE.PathConstrainer_Remove(swigCPtr, Animatable.getCPtr(target));
208 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
211 public Vector3 Forward
215 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
216 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.FORWARD).Get(temp);
221 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.FORWARD, new Tizen.NUI.PropertyValue(value));
225 public PropertyArray Points
229 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
230 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.POINTS).Get(temp);
235 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.POINTS, new Tizen.NUI.PropertyValue(value));
239 public PropertyArray ControlPoints
243 Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
244 Tizen.NUI.Object.GetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS).Get(temp);
249 Tizen.NUI.Object.SetProperty(swigCPtr, PathConstrainer.Property.CONTROL_POINTS, new Tizen.NUI.PropertyValue(value));