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.
18 using System.ComponentModel;
22 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
23 [EditorBrowsable(EditorBrowsableState.Never)]
24 public class DefaultRuler : Ruler
26 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
28 internal DefaultRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Ruler.DefaultRuler_SWIGUpcast(cPtr), cMemoryOwn)
30 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DefaultRuler obj)
35 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
39 [EditorBrowsable(EditorBrowsableState.Never)]
40 protected override void Dispose(DisposeTypes type)
47 if (type == DisposeTypes.Explicit)
50 //Release your own managed resources here.
51 //You should release all of your own disposable objects here.
55 //Release your own unmanaged resources here.
56 //You should not access any managed member here except static instance.
57 //because the execution order of Finalizes is non-deterministic.
59 if (swigCPtr.Handle != global::System.IntPtr.Zero)
64 Interop.Ruler.delete_DefaultRuler(swigCPtr);
66 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
72 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
73 [EditorBrowsable(EditorBrowsableState.Never)]
74 public DefaultRuler() : this(Interop.Ruler.new_DefaultRuler(), true)
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
79 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
80 [EditorBrowsable(EditorBrowsableState.Never)]
81 public override float Snap(float x, float bias)
83 float ret = Interop.Ruler.DefaultRuler_Snap(swigCPtr, x, bias);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
89 [EditorBrowsable(EditorBrowsableState.Never)]
90 public override float GetPositionFromPage(uint page, out uint volume, bool wrap)
92 float ret = Interop.Ruler.DefaultRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap);
93 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
98 [EditorBrowsable(EditorBrowsableState.Never)]
99 public override uint GetPageFromPosition(float position, bool wrap)
101 uint ret = Interop.Ruler.DefaultRuler_GetPageFromPosition(swigCPtr, position, wrap);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
107 [EditorBrowsable(EditorBrowsableState.Never)]
108 public override uint GetTotalPages()
110 uint ret = Interop.Ruler.DefaultRuler_GetTotalPages(swigCPtr);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();