1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
11 //#define DOT_NET_CORE
13 using System.Reflection;
16 using Tizen.NUI.BaseComponents;
21 internal class CustomAlgorithmInterface : global::System.IDisposable
23 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
24 protected bool swigCMemOwn;
26 internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn)
28 swigCMemOwn = cMemoryOwn;
29 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CustomAlgorithmInterface obj)
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37 //A Flag to check who called Dispose(). (By User or DisposeQueue)
38 private bool isDisposeQueued = false;
39 //A Flat to check if it is already disposed.
40 protected bool disposed = false;
43 ~CustomAlgorithmInterface()
47 isDisposeQueued = true;
48 DisposeQueue.Instance.Add(this);
54 //Throw excpetion if Dispose() is called in separate thread.
55 if (!Window.IsInstalled())
57 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
62 Dispose(DisposeTypes.Implicit);
66 Dispose(DisposeTypes.Explicit);
67 System.GC.SuppressFinalize(this);
71 protected virtual void Dispose(DisposeTypes type)
78 if (type == DisposeTypes.Explicit)
81 //Release your own managed resources here.
82 //You should release all of your own disposable objects here.
86 //Release your own unmanaged resources here.
87 //You should not access any managed member here except static instance.
88 //because the execution order of Finalizes is non-deterministic.
90 if (swigCPtr.Handle != global::System.IntPtr.Zero)
95 NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr);
97 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
103 public virtual View GetNextFocusableView(View current, View proposed, View.FocusDirection direction)
105 View ret = new View(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, View.getCPtr(current), View.getCPtr(proposed), (int)direction), true);
106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true)
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113 SwigDirectorConnect();
116 private void SwigDirectorConnect()
118 if (SwigDerivedClassHasMethod("GetNextFocusableView", swigMethodTypes0))
119 swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableView);
120 NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0);
124 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)
126 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
127 bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface));
128 return hasDerivedMethod && (methodInfo != null);
131 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
132 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);
133 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(CustomAlgorithmInterface));
134 return hasDerivedMethod;
138 private global::System.IntPtr SwigDirectorGetNextFocusableView(global::System.IntPtr current, global::System.IntPtr proposed, int direction)
140 return View.getCPtr(GetNextFocusableView(new View(current, true), new View(proposed, true), (View.FocusDirection)direction)).Handle;
143 public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction);
145 private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0;
147 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(View), typeof(View), typeof(View.FocusDirection) };