2ab91cf4fb82acbc432070a20a163380497f0ab6
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / RulerPtr.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Tizen.NUI
12 {
13
14     public class RulerPtr : global::System.IDisposable
15     {
16         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17         protected bool swigCMemOwn;
18
19         internal RulerPtr(global::System.IntPtr cPtr, bool cMemoryOwn)
20         {
21             swigCMemOwn = cMemoryOwn;
22             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23         }
24
25         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RulerPtr obj)
26         {
27             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28         }
29
30         //A Flag to check who called Dispose(). (By User or DisposeQueue)
31         private bool isDisposeQueued = false;
32         //A Flat to check if it is already disposed.
33         protected bool disposed = false;
34
35
36         ~RulerPtr()
37         {
38             if (!isDisposeQueued)
39             {
40                 isDisposeQueued = true;
41                 DisposeQueue.Instance.Add(this);
42             }
43         }
44
45         public void Dispose()
46         {
47             //Throw excpetion if Dispose() is called in separate thread.
48             if (!Window.IsInstalled())
49             {
50                 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
51             }
52
53             if (isDisposeQueued)
54             {
55                 Dispose(DisposeTypes.Implicit);
56             }
57             else
58             {
59                 Dispose(DisposeTypes.Explicit);
60                 System.GC.SuppressFinalize(this);
61             }
62         }
63
64         protected virtual void Dispose(DisposeTypes type)
65         {
66             if (disposed)
67             {
68                 return;
69             }
70
71             if (type == DisposeTypes.Explicit)
72             {
73                 //Called by User
74                 //Release your own managed resources here.
75                 //You should release all of your own disposable objects here.
76
77             }
78
79             //Release your own unmanaged resources here.
80             //You should not access any managed member here except static instance.
81             //because the execution order of Finalizes is non-deterministic.
82
83             if (swigCPtr.Handle != global::System.IntPtr.Zero)
84             {
85                 if (swigCMemOwn)
86                 {
87                     swigCMemOwn = false;
88                     NDalicPINVOKE.delete_RulerPtr(swigCPtr);
89                 }
90                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
91             }
92
93             disposed = true;
94         }
95
96
97         public RulerPtr() : this(NDalicPINVOKE.new_RulerPtr__SWIG_0(), true)
98         {
99             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100         }
101
102         public RulerPtr(Ruler p) : this(NDalicPINVOKE.new_RulerPtr__SWIG_1(Ruler.getCPtr(p)), true)
103         {
104             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105         }
106
107         public RulerPtr(RulerPtr rhs) : this(NDalicPINVOKE.new_RulerPtr__SWIG_2(RulerPtr.getCPtr(rhs)), true)
108         {
109             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110         }
111
112         public Ruler Get()
113         {
114             global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr_Get(swigCPtr);
115             Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false);
116             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117             return ret;
118         }
119
120         public Ruler __deref__()
121         {
122             global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr___deref__(swigCPtr);
123             Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false);
124             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125             return ret;
126         }
127
128         public Ruler __ref__()
129         {
130             Ruler ret = new Ruler(NDalicPINVOKE.RulerPtr___ref__(swigCPtr), false);
131             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132             return ret;
133         }
134
135         public RulerPtr Assign(RulerPtr rhs)
136         {
137             RulerPtr ret = new RulerPtr(NDalicPINVOKE.RulerPtr_Assign__SWIG_0(swigCPtr, RulerPtr.getCPtr(rhs)), false);
138             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139             return ret;
140         }
141
142         public RulerPtr Assign(Ruler rhs)
143         {
144             RulerPtr ret = new RulerPtr(NDalicPINVOKE.RulerPtr_Assign__SWIG_1(swigCPtr, Ruler.getCPtr(rhs)), false);
145             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
146             return ret;
147         }
148
149         public void Reset()
150         {
151             NDalicPINVOKE.RulerPtr_Reset__SWIG_0(swigCPtr);
152             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153         }
154
155         public void Reset(Ruler rhs)
156         {
157             NDalicPINVOKE.RulerPtr_Reset__SWIG_1(swigCPtr, Ruler.getCPtr(rhs));
158             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
159         }
160
161         public Ruler Detach()
162         {
163             global::System.IntPtr cPtr = NDalicPINVOKE.RulerPtr_Detach(swigCPtr);
164             Ruler ret = (cPtr == global::System.IntPtr.Zero) ? null : new Ruler(cPtr, false);
165             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166             return ret;
167         }
168
169         public float Snap(float x, float bias)
170         {
171             float ret = NDalicPINVOKE.RulerPtr_Snap__SWIG_0(swigCPtr, x, bias);
172             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173             return ret;
174         }
175
176         public float Snap(float x)
177         {
178             float ret = NDalicPINVOKE.RulerPtr_Snap__SWIG_1(swigCPtr, x);
179             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
180             return ret;
181         }
182
183         public float GetPositionFromPage(uint page, out uint volume, bool wrap)
184         {
185             float ret = NDalicPINVOKE.RulerPtr_GetPositionFromPage(swigCPtr, page, out volume, wrap);
186             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187             return ret;
188         }
189
190         public uint GetPageFromPosition(float position, bool wrap)
191         {
192             uint ret = NDalicPINVOKE.RulerPtr_GetPageFromPosition(swigCPtr, position, wrap);
193             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194             return ret;
195         }
196
197         public uint GetTotalPages()
198         {
199             uint ret = NDalicPINVOKE.RulerPtr_GetTotalPages(swigCPtr);
200             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201             return ret;
202         }
203
204         public Ruler.RulerType GetType()
205         {
206             Ruler.RulerType ret = (Ruler.RulerType)NDalicPINVOKE.RulerPtr_GetType(swigCPtr);
207             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
208             return ret;
209         }
210
211         public bool IsEnabled()
212         {
213             bool ret = NDalicPINVOKE.RulerPtr_IsEnabled(swigCPtr);
214             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215             return ret;
216         }
217
218         public void Enable()
219         {
220             NDalicPINVOKE.RulerPtr_Enable(swigCPtr);
221             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222         }
223
224         public void Disable()
225         {
226             NDalicPINVOKE.RulerPtr_Disable(swigCPtr);
227             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
228         }
229
230         public void SetDomain(RulerDomain domain)
231         {
232             NDalicPINVOKE.RulerPtr_SetDomain(swigCPtr, RulerDomain.getCPtr(domain));
233             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234         }
235
236         public RulerDomain GetDomain()
237         {
238             RulerDomain ret = new RulerDomain(NDalicPINVOKE.RulerPtr_GetDomain(swigCPtr), false);
239             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240             return ret;
241         }
242
243         public void DisableDomain()
244         {
245             NDalicPINVOKE.RulerPtr_DisableDomain(swigCPtr);
246             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247         }
248
249         public float Clamp(float x, float length, float scale)
250         {
251             float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_0(swigCPtr, x, length, scale);
252             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253             return ret;
254         }
255
256         public float Clamp(float x, float length)
257         {
258             float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_1(swigCPtr, x, length);
259             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260             return ret;
261         }
262
263         public float Clamp(float x)
264         {
265             float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_2(swigCPtr, x);
266             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267             return ret;
268         }
269
270         internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped)
271         {
272             float ret = NDalicPINVOKE.RulerPtr_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped));
273             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274             return ret;
275         }
276
277         public float SnapAndClamp(float x, float bias, float length, float scale)
278         {
279             float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_0(swigCPtr, x, bias, length, scale);
280             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281             return ret;
282         }
283
284         public float SnapAndClamp(float x, float bias, float length)
285         {
286             float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_1(swigCPtr, x, bias, length);
287             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
288             return ret;
289         }
290
291         public float SnapAndClamp(float x, float bias)
292         {
293             float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_2(swigCPtr, x, bias);
294             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295             return ret;
296         }
297
298         public float SnapAndClamp(float x)
299         {
300             float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_3(swigCPtr, x);
301             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302             return ret;
303         }
304
305         internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped)
306         {
307             float ret = NDalicPINVOKE.RulerPtr_SnapAndClamp__SWIG_4(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped));
308             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309             return ret;
310         }
311
312         public void Reference()
313         {
314             NDalicPINVOKE.RulerPtr_Reference(swigCPtr);
315             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316         }
317
318         public void Unreference()
319         {
320             NDalicPINVOKE.RulerPtr_Unreference(swigCPtr);
321             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
322         }
323
324         public int ReferenceCount()
325         {
326             int ret = NDalicPINVOKE.RulerPtr_ReferenceCount(swigCPtr);
327             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328             return ret;
329         }
330
331     }
332
333 }