Commit manual merge for dali-csharp.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / CustomAlgorithmInterface.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.12
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 //#define DOT_NET_CORE
12 #if DOT_NET_CORE
13 using System.Reflection;
14 #endif
15
16 using Tizen.NUI.BaseComponents;
17
18 namespace Tizen.NUI {
19
20 internal class CustomAlgorithmInterface : global::System.IDisposable {
21   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22   protected bool swigCMemOwn;
23
24   internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) {
25     swigCMemOwn = cMemoryOwn;
26     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
27   }
28
29   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj) {
30     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
31   }
32
33   ~CustomAlgorithmInterface() {
34     DisposeQueue.Instance.Add(this);
35   }
36
37   public virtual void Dispose() {
38     if (!Window.IsInstalled()) {
39       DisposeQueue.Instance.Add(this);
40       return;
41     }
42     lock(this) {
43       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
44         if (swigCMemOwn) {
45           swigCMemOwn = false;
46           NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr);
47         }
48         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
49       }
50       global::System.GC.SuppressFinalize(this);
51     }
52   }
53
54   public virtual View GetNextFocusableView(View current, View proposed, View.FocusDirection direction) {
55     View ret = new View(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, View.getCPtr(current), View.getCPtr(proposed), (int)direction), true);
56     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
57     return ret;
58   }
59
60   public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) {
61     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
62     SwigDirectorConnect();
63   }
64
65   private void SwigDirectorConnect() {
66     if (SwigDerivedClassHasMethod("GetNextFocusableView", swigMethodTypes0))
67       swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableView);
68     NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0);
69   }
70
71 #if DOT_NET_CORE
72   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
73     global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
74     bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface));
75     return hasDerivedMethod && (methodInfo != null);
76   }
77 #else
78   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
79     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);
80     bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(CustomAlgorithmInterface));
81     return hasDerivedMethod;
82   }
83 #endif
84
85   private global::System.IntPtr SwigDirectorGetNextFocusableView(global::System.IntPtr current, global::System.IntPtr proposed, int direction) {
86     return View.getCPtr(GetNextFocusableView(new View(current, true), new View(proposed, true), (View.FocusDirection)direction)).Handle;
87   }
88
89   public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction);
90
91   private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0;
92
93   private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(View), typeof(View), typeof(View.FocusDirection) };
94 }
95
96 }