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 //------------------------------------------------------------------------------
14 internal class TypeRegistration : global::System.IDisposable
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17 protected bool swigCMemOwn;
19 internal TypeRegistration(global::System.IntPtr cPtr, bool cMemoryOwn)
21 swigCMemOwn = cMemoryOwn;
22 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TypeRegistration obj)
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 //A Flag to check who called Dispose(). (By User or DisposeQueue)
30 private bool isDisposeQueued = false;
31 //A Flat to check if it is already disposed.
32 protected bool disposed = false;
39 isDisposeQueued = true;
40 DisposeQueue.Instance.Add(this);
46 //Throw excpetion if Dispose() is called in separate thread.
47 if (!Window.IsInstalled())
49 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
54 Dispose(DisposeTypes.Implicit);
58 Dispose(DisposeTypes.Explicit);
59 System.GC.SuppressFinalize(this);
63 protected virtual void Dispose(DisposeTypes type)
70 if (type == DisposeTypes.Explicit)
73 //Release your own managed resources here.
74 //You should release all of your own disposable objects here.
78 //Release your own unmanaged resources here.
79 //You should not access any managed member here except static instance.
80 //because the execution order of Finalizes is non-deterministic.
82 if (swigCPtr.Handle != global::System.IntPtr.Zero)
87 NDalicPINVOKE.delete_TypeRegistration(swigCPtr);
89 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
95 static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f)
97 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f);
98 return NDalicPINVOKE.new_TypeRegistration__SWIG_0(SWIGTYPE_p_std__type_info.getCPtr(registerType), SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip));
101 internal TypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f) : this(TypeRegistration.SwigConstructTypeRegistration(registerType, baseType, f), true)
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
106 static private global::System.IntPtr SwigConstructTypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f, bool callCreateOnInit)
108 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f);
109 return NDalicPINVOKE.new_TypeRegistration__SWIG_1(SWIGTYPE_p_std__type_info.getCPtr(registerType), SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip), callCreateOnInit);
112 internal TypeRegistration(SWIGTYPE_p_std__type_info registerType, SWIGTYPE_p_std__type_info baseType, System.Delegate f, bool callCreateOnInit) : this(TypeRegistration.SwigConstructTypeRegistration(registerType, baseType, f, callCreateOnInit), true)
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 static private global::System.IntPtr SwigConstructTypeRegistration(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f)
119 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(f);
120 return NDalicPINVOKE.new_TypeRegistration__SWIG_2(name, SWIGTYPE_p_std__type_info.getCPtr(baseType), new System.Runtime.InteropServices.HandleRef(null, ip));
123 internal TypeRegistration(string name, SWIGTYPE_p_std__type_info baseType, System.Delegate f) : this(TypeRegistration.SwigConstructTypeRegistration(name, baseType, f), true)
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 public string RegisteredName()
130 string ret = NDalicPINVOKE.TypeRegistration_RegisteredName(swigCPtr);
131 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
135 public static void RegisterControl(string controlName, System.Delegate createFunc)
137 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(createFunc);
139 NDalicPINVOKE.TypeRegistration_RegisterControl(controlName, new System.Runtime.InteropServices.HandleRef(null, ip));
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 public static void RegisterProperty(string controlName, string propertyName, int index, PropertyType type, System.Delegate setFunc, System.Delegate getFunc)
146 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(setFunc);
147 System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(getFunc);
149 NDalicPINVOKE.TypeRegistration_RegisterProperty(controlName, propertyName, index, (int)type, new System.Runtime.InteropServices.HandleRef(null, ip), new System.Runtime.InteropServices.HandleRef(null, ip2));
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();