Manual merge for nui v0.2.34
[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 namespace Tizen.NUI {
17
18 internal class CustomAlgorithmInterface : global::System.IDisposable {
19   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20   protected bool swigCMemOwn;
21
22   internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) {
23     swigCMemOwn = cMemoryOwn;
24     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25   }
26
27   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj) {
28     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29   }
30
31   ~CustomAlgorithmInterface() {
32     DisposeQueue.Instance.Add(this);
33   }
34
35   public virtual void Dispose() {
36     if (!Stage.IsInstalled()) {
37       DisposeQueue.Instance.Add(this);
38       return;
39     }
40     lock(this) {
41       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42         if (swigCMemOwn) {
43           swigCMemOwn = false;
44           NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr);
45         }
46         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47       }
48       global::System.GC.SuppressFinalize(this);
49     }
50   }
51
52   public virtual Actor GetNextFocusableActor(Actor current, Actor proposed, View.FocusDirection direction) {
53     Actor ret = new Actor(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, Actor.getCPtr(current), Actor.getCPtr(proposed), (int)direction), true);
54     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55     return ret;
56   }
57
58   public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) {
59     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60     SwigDirectorConnect();
61   }
62
63   private void SwigDirectorConnect() {
64     if (SwigDerivedClassHasMethod("GetNextFocusableActor", swigMethodTypes0))
65       swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableActor);
66     NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0);
67   }
68
69 #if (DOT_NET_CORE)
70   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
71     global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
72     bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface));
73     return hasDerivedMethod && (methodInfo != null);
74   }
75 #else
76   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
77     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);
78     bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(CustomAlgorithmInterface));
79     return hasDerivedMethod;
80   }
81 #endif
82
83   private global::System.IntPtr SwigDirectorGetNextFocusableActor(global::System.IntPtr current, global::System.IntPtr proposed, int direction) {
84     return Actor.getCPtr(GetNextFocusableActor(new Actor(current, true), new Actor(proposed, true), (View.FocusDirection)direction)).Handle;
85   }
86
87   public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction);
88
89   private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0;
90
91   private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(Actor), typeof(Actor), typeof(View.FocusDirection) };
92 }
93
94 }