Separate C# classes into Internal and Public
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / CustomAlgorithmInterface.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
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 Dali {
12
13 internal class CustomAlgorithmInterface : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~CustomAlgorithmInterface() {
27     DisposeQueue.Instance.Add(this);
28   }
29
30   public virtual void Dispose() {
31     if (!Window.IsInstalled()) {
32       DisposeQueue.Instance.Add(this);
33       return;
34     }
35
36     lock(this) {
37       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
38         if (swigCMemOwn) {
39           swigCMemOwn = false;
40           NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr);
41         }
42         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
43       }
44       global::System.GC.SuppressFinalize(this);
45     }
46   }
47
48
49   public virtual View GetNextFocusableView(View current, View proposed, View.Focus.Direction direction) {
50     View ret = new View(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, View.getCPtr(current), View.getCPtr(proposed), (int)direction), true);
51     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52     return ret;
53   }
54
55   internal CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) {
56     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57     SwigDirectorConnect();
58   }
59
60   private void SwigDirectorConnect() {
61     if (SwigDerivedClassHasMethod("GetNextFocusableView", swigMethodTypes0))
62       swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableView);
63     NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0);
64   }
65
66   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
67     global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
68     bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(CustomAlgorithmInterface));
69     return hasDerivedMethod;
70   }
71
72   private global::System.IntPtr SwigDirectorGetNextFocusableView(global::System.IntPtr current, global::System.IntPtr proposed, int direction) {
73     return View.getCPtr(GetNextFocusableView(new View(current, true), new View(proposed, true), (View.Focus.Direction)direction)).Handle;
74   }
75
76   internal delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction);
77
78   private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0;
79
80   private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(View), typeof(View), typeof(View.Focus.Direction) };
81 }
82
83 }