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 ClampState2D : global::System.IDisposable
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17 protected bool swigCMemOwn;
19 internal ClampState2D(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(ClampState2D obj)
27 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
30 //A Flag to check who called Dispose(). (By User or DisposeQueue)
31 private bool isDisposeQueued = false;
32 //A Flat to check if it is already disposed.
33 protected bool disposed = false;
35 protected enum DisposeTypes
37 Explicit, //Called By User
38 Implicit, //Called by DisposeQueue
45 isDisposeQueued = true;
46 DisposeQueue.Instance.Add(this);
52 //Throw excpetion if Dispose() is called in separate thread.
53 if (!Window.IsInstalled())
55 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
60 Dispose(DisposeTypes.Implicit);
64 Dispose(DisposeTypes.Explicit);
65 System.GC.SuppressFinalize(this);
69 protected virtual void Dispose(DisposeTypes type)
76 if (type == DisposeTypes.Explicit)
79 //Release your own managed resources here.
80 //You should release all of your own disposable objects here.
84 //Release your own unmanaged resources here.
85 //You should not access any managed member here except static instance.
86 //because the execution order of Finalizes is non-deterministic.
88 if (swigCPtr.Handle != global::System.IntPtr.Zero)
93 NDalicPINVOKE.delete_ClampState2D(swigCPtr);
95 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
106 NDalicPINVOKE.ClampState2D_x_set(swigCPtr, (int)value);
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111 ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_x_get(swigCPtr);
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 NDalicPINVOKE.ClampState2D_y_set(swigCPtr, (int)value);
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 ClampState ret = (ClampState)NDalicPINVOKE.ClampState2D_y_get(swigCPtr);
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 public ClampState2D() : this(NDalicPINVOKE.new_ClampState2D(), true)
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();