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 //------------------------------------------------------------------------------
13 using System.Reflection;
18 internal class CustomAlgorithmInterface : global::System.IDisposable {
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 protected bool swigCMemOwn;
22 internal CustomAlgorithmInterface(global::System.IntPtr cPtr, bool cMemoryOwn) {
23 swigCMemOwn = cMemoryOwn;
24 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
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;
31 ~CustomAlgorithmInterface() {
35 public virtual void Dispose() {
37 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40 NDalicPINVOKE.delete_CustomAlgorithmInterface(swigCPtr);
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
44 global::System.GC.SuppressFinalize(this);
48 public virtual Actor GetNextFocusableActor(Actor current, Actor proposed, View.FocusDirection direction) {
49 Actor ret = new Actor(NDalicPINVOKE.CustomAlgorithmInterface_GetNextFocusableActor(swigCPtr, Actor.getCPtr(current), Actor.getCPtr(proposed), (int)direction), true);
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54 public CustomAlgorithmInterface() : this(NDalicPINVOKE.new_CustomAlgorithmInterface(), true) {
55 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
56 SwigDirectorConnect();
59 private void SwigDirectorConnect() {
60 if (SwigDerivedClassHasMethod("GetNextFocusableActor", swigMethodTypes0))
61 swigDelegate0 = new SwigDelegateCustomAlgorithmInterface_0(SwigDirectorGetNextFocusableActor);
62 NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0);
66 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
67 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
68 bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface));
69 return hasDerivedMethod;
72 private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
73 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);
74 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(CustomAlgorithmInterface));
75 return hasDerivedMethod;
79 private global::System.IntPtr SwigDirectorGetNextFocusableActor(global::System.IntPtr current, global::System.IntPtr proposed, int direction) {
80 return Actor.getCPtr(GetNextFocusableActor(new Actor(current, true), new Actor(proposed, true), (View.FocusDirection)direction)).Handle;
83 public delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction);
85 private SwigDelegateCustomAlgorithmInterface_0 swigDelegate0;
87 private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(Actor), typeof(Actor), typeof(View.FocusDirection) };