Merge "Add PRIVATECOMMAND of ImfEvent in text-controller" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / TouchPointContainer.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
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 namespace Dali {
12
13 public class TouchPointContainer : global::System.IDisposable, global::System.Collections.IEnumerable
14     , global::System.Collections.Generic.IEnumerable<TouchPoint>
15  {
16   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
17   protected bool swigCMemOwn;
18
19   internal TouchPointContainer(global::System.IntPtr cPtr, bool cMemoryOwn) {
20     swigCMemOwn = cMemoryOwn;
21     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22   }
23
24   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchPointContainer obj) {
25     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
26   }
27
28   ~TouchPointContainer() {
29     DisposeQueue.Instance.Add(this);
30   }
31
32   public virtual void Dispose() {
33     if (!Window.IsInstalled()) {
34       DisposeQueue.Instance.Add(this);
35       return;
36     }
37
38     lock(this) {
39       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40         if (swigCMemOwn) {
41           swigCMemOwn = false;
42           NDalicPINVOKE.delete_TouchPointContainer(swigCPtr);
43         }
44         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
45       }
46       global::System.GC.SuppressFinalize(this);
47     }
48   }
49
50
51   public TouchPointContainer(global::System.Collections.ICollection c) : this() {
52     if (c == null)
53       throw new global::System.ArgumentNullException("c");
54     foreach (TouchPoint element in c) {
55       this.Add(element);
56     }
57   }
58
59   public bool IsFixedSize {
60     get {
61       return false;
62     }
63   }
64
65   public bool IsReadOnly {
66     get {
67       return false;
68     }
69   }
70
71   public TouchPoint this[int index]  {
72     get {
73       return getitem(index);
74     }
75     set {
76       setitem(index, value);
77     }
78   }
79
80   public int Capacity {
81     get {
82       return (int)capacity();
83     }
84     set {
85       if (value < size())
86         throw new global::System.ArgumentOutOfRangeException("Capacity");
87       reserve((uint)value);
88     }
89   }
90
91   public int Count {
92     get {
93       return (int)size();
94     }
95   }
96
97   public bool IsSynchronized {
98     get {
99       return false;
100     }
101   }
102
103   public void CopyTo(TouchPoint[] array)
104   {
105     CopyTo(0, array, 0, this.Count);
106   }
107
108   public void CopyTo(TouchPoint[] array, int arrayIndex)
109   {
110     CopyTo(0, array, arrayIndex, this.Count);
111   }
112
113   public void CopyTo(int index, TouchPoint[] array, int arrayIndex, int count)
114   {
115     if (array == null)
116       throw new global::System.ArgumentNullException("array");
117     if (index < 0)
118       throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
119     if (arrayIndex < 0)
120       throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
121     if (count < 0)
122       throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
123     if (array.Rank > 1)
124       throw new global::System.ArgumentException("Multi dimensional array.", "array");
125     if (index+count > this.Count || arrayIndex+count > array.Length)
126       throw new global::System.ArgumentException("Number of elements to copy is too large.");
127     for (int i=0; i<count; i++)
128       array.SetValue(getitemcopy(index+i), arrayIndex+i);
129   }
130
131   global::System.Collections.Generic.IEnumerator<TouchPoint> global::System.Collections.Generic.IEnumerable<TouchPoint>.GetEnumerator() {
132     return new TouchPointContainerEnumerator(this);
133   }
134
135   global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
136     return new TouchPointContainerEnumerator(this);
137   }
138
139   public TouchPointContainerEnumerator GetEnumerator() {
140     return new TouchPointContainerEnumerator(this);
141   }
142
143   // Type-safe enumerator
144   /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
145   /// whenever the collection is modified. This has been done for changes in the size of the
146   /// collection but not when one of the elements of the collection is modified as it is a bit
147   /// tricky to detect unmanaged code that modifies the collection under our feet.
148   public sealed class TouchPointContainerEnumerator : global::System.Collections.IEnumerator
149     , global::System.Collections.Generic.IEnumerator<TouchPoint>
150   {
151     private TouchPointContainer collectionRef;
152     private int currentIndex;
153     private object currentObject;
154     private int currentSize;
155
156     public TouchPointContainerEnumerator(TouchPointContainer collection) {
157       collectionRef = collection;
158       currentIndex = -1;
159       currentObject = null;
160       currentSize = collectionRef.Count;
161     }
162
163     // Type-safe iterator Current
164     public TouchPoint Current {
165       get {
166         if (currentIndex == -1)
167           throw new global::System.InvalidOperationException("Enumeration not started.");
168         if (currentIndex > currentSize - 1)
169           throw new global::System.InvalidOperationException("Enumeration finished.");
170         if (currentObject == null)
171           throw new global::System.InvalidOperationException("Collection modified.");
172         return (TouchPoint)currentObject;
173       }
174     }
175
176     // Type-unsafe IEnumerator.Current
177     object global::System.Collections.IEnumerator.Current {
178       get {
179         return Current;
180       }
181     }
182
183     public bool MoveNext() {
184       int size = collectionRef.Count;
185       bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
186       if (moveOkay) {
187         currentIndex++;
188         currentObject = collectionRef[currentIndex];
189       } else {
190         currentObject = null;
191       }
192       return moveOkay;
193     }
194
195     public void Reset() {
196       currentIndex = -1;
197       currentObject = null;
198       if (collectionRef.Count != currentSize) {
199         throw new global::System.InvalidOperationException("Collection modified.");
200       }
201     }
202
203     public void Dispose() {
204         currentIndex = -1;
205         currentObject = null;
206     }
207   }
208
209   public void Clear() {
210     NDalicPINVOKE.TouchPointContainer_Clear(swigCPtr);
211     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212   }
213
214   public void Add(TouchPoint x) {
215     NDalicPINVOKE.TouchPointContainer_Add(swigCPtr, TouchPoint.getCPtr(x));
216     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217   }
218
219   private uint size() {
220     uint ret = NDalicPINVOKE.TouchPointContainer_size(swigCPtr);
221     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222     return ret;
223   }
224
225   private uint capacity() {
226     uint ret = NDalicPINVOKE.TouchPointContainer_capacity(swigCPtr);
227     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
228     return ret;
229   }
230
231   private void reserve(uint n) {
232     NDalicPINVOKE.TouchPointContainer_reserve(swigCPtr, n);
233     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234   }
235
236   public TouchPointContainer() : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_0(), true) {
237     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
238   }
239
240   public TouchPointContainer(TouchPointContainer other) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_1(TouchPointContainer.getCPtr(other)), true) {
241     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242   }
243
244   public TouchPointContainer(int capacity) : this(NDalicPINVOKE.new_TouchPointContainer__SWIG_2(capacity), true) {
245     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246   }
247
248   private TouchPoint getitemcopy(int index) {
249     TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitemcopy(swigCPtr, index), true);
250     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251     return ret;
252   }
253
254   private TouchPoint getitem(int index) {
255     TouchPoint ret = new TouchPoint(NDalicPINVOKE.TouchPointContainer_getitem(swigCPtr, index), false);
256     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257     return ret;
258   }
259
260   private void setitem(int index, TouchPoint val) {
261     NDalicPINVOKE.TouchPointContainer_setitem(swigCPtr, index, TouchPoint.getCPtr(val));
262     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263   }
264
265   public void AddRange(TouchPointContainer values) {
266     NDalicPINVOKE.TouchPointContainer_AddRange(swigCPtr, TouchPointContainer.getCPtr(values));
267     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268   }
269
270   public TouchPointContainer GetRange(int index, int count) {
271     global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_GetRange(swigCPtr, index, count);
272     TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true);
273     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274     return ret;
275   }
276
277   public void Insert(int index, TouchPoint x) {
278     NDalicPINVOKE.TouchPointContainer_Insert(swigCPtr, index, TouchPoint.getCPtr(x));
279     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280   }
281
282   public void InsertRange(int index, TouchPointContainer values) {
283     NDalicPINVOKE.TouchPointContainer_InsertRange(swigCPtr, index, TouchPointContainer.getCPtr(values));
284     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285   }
286
287   public void RemoveAt(int index) {
288     NDalicPINVOKE.TouchPointContainer_RemoveAt(swigCPtr, index);
289     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290   }
291
292   public void RemoveRange(int index, int count) {
293     NDalicPINVOKE.TouchPointContainer_RemoveRange(swigCPtr, index, count);
294     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295   }
296
297   public static TouchPointContainer Repeat(TouchPoint value, int count) {
298     global::System.IntPtr cPtr = NDalicPINVOKE.TouchPointContainer_Repeat(TouchPoint.getCPtr(value), count);
299     TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, true);
300     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301     return ret;
302   }
303
304   public void Reverse() {
305     NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_0(swigCPtr);
306     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307   }
308
309   public void Reverse(int index, int count) {
310     NDalicPINVOKE.TouchPointContainer_Reverse__SWIG_1(swigCPtr, index, count);
311     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312   }
313
314   public void SetRange(int index, TouchPointContainer values) {
315     NDalicPINVOKE.TouchPointContainer_SetRange(swigCPtr, index, TouchPointContainer.getCPtr(values));
316     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317   }
318
319 }
320
321 }