merging dali-sharp class scope with nui
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / DefaultRuler.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     internal class DefaultRuler : Ruler
15     {
16         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17
18         internal DefaultRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.DefaultRuler_SWIGUpcast(cPtr), cMemoryOwn)
19         {
20             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
21         }
22
23         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DefaultRuler obj)
24         {
25             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
26         }
27
28         protected override void Dispose(DisposeTypes type)
29         {
30             if (disposed)
31             {
32                 return;
33             }
34
35             if (type == DisposeTypes.Explicit)
36             {
37                 //Called by User
38                 //Release your own managed resources here.
39                 //You should release all of your own disposable objects here.
40
41             }
42
43             //Release your own unmanaged resources here.
44             //You should not access any managed member here except static instance.
45             //because the execution order of Finalizes is non-deterministic.
46
47             if (swigCPtr.Handle != global::System.IntPtr.Zero)
48             {
49                 if (swigCMemOwn)
50                 {
51                     swigCMemOwn = false;
52                     NDalicPINVOKE.delete_DefaultRuler(swigCPtr);
53                 }
54                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55             }
56
57             base.Dispose(type);
58         }
59
60         public DefaultRuler() : this(NDalicPINVOKE.new_DefaultRuler(), true)
61         {
62             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63         }
64
65         public override float Snap(float x, float bias)
66         {
67             float ret = NDalicPINVOKE.DefaultRuler_Snap(swigCPtr, x, bias);
68             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69             return ret;
70         }
71
72         public override float GetPositionFromPage(uint page, out uint volume, bool wrap)
73         {
74             float ret = NDalicPINVOKE.DefaultRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap);
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76             return ret;
77         }
78
79         public override uint GetPageFromPosition(float position, bool wrap)
80         {
81             uint ret = NDalicPINVOKE.DefaultRuler_GetPageFromPosition(swigCPtr, position, wrap);
82             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83             return ret;
84         }
85
86         public override uint GetTotalPages()
87         {
88             uint ret = NDalicPINVOKE.DefaultRuler_GetTotalPages(swigCPtr);
89             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90             return ret;
91         }
92
93     }
94
95 }