[NUI] Setting since_tizen 3/4 on Tizen.NUI API
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / TapGesture.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 namespace Tizen.NUI
19 {
20
21     /// <summary>
22     /// A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times.
23     /// </summary>
24     /// <since_tizen> 3 </since_tizen>
25     public class TapGesture : Gesture
26     {
27         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
28
29         internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TapGesture_SWIGUpcast(cPtr), cMemoryOwn)
30         {
31             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
32         }
33
34         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj)
35         {
36             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
37         }
38
39         /// <summary>
40         /// Dispose.
41         /// </summary>
42         /// <since_tizen> 3 </since_tizen>
43         protected override void Dispose(DisposeTypes type)
44         {
45             if(disposed)
46             {
47                 return;
48             }
49
50             if(type == DisposeTypes.Explicit)
51             {
52                 //Called by User
53                 //Release your own managed resources here.
54                 //You should release all of your own disposable objects here.
55             }
56
57             //Release your own unmanaged resources here.
58             //You should not access any managed member here except static instance.
59             //because the execution order of Finalizes is non-deterministic.
60
61             if (swigCPtr.Handle != global::System.IntPtr.Zero)
62             {
63                 if (swigCMemOwn)
64                 {
65                     swigCMemOwn = false;
66                     NDalicPINVOKE.delete_TapGesture(swigCPtr);
67                 }
68                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69             }
70
71             base.Dispose(type);
72         }
73
74
75         /// <summary>
76         /// Gets the TapGesture from the pointer.
77         /// </summary>
78         /// <param name="cPtr">The pointer to cast.</param>
79         /// <returns>The TapGesture object.</returns>
80         internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
81         {
82             TapGesture ret = new TapGesture(cPtr, false);
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84             return ret;
85         }
86
87         /// <summary>
88         /// The number of taps property (read-only).
89         /// </summary>
90         /// <since_tizen> 3 </since_tizen>
91         public uint NumberOfTaps
92         {
93             get
94             {
95                 return numberOfTaps;
96             }
97         }
98
99         /// <summary>
100         /// The number of touches property (read-only).
101         /// </summary>
102         /// <since_tizen> 3 </since_tizen>
103         public uint NumberOfTouches
104         {
105             get
106             {
107                 return numberOfTouches;
108             }
109         }
110
111         /// <summary>
112         /// The screen point property (read-only).
113         /// </summary>
114         /// <since_tizen> 3 </since_tizen>
115         public Vector2 ScreenPoint
116         {
117             get
118             {
119                 return screenPoint;
120             }
121         }
122
123         /// <summary>
124         /// The local point property (read-only).
125         /// </summary>
126         /// <since_tizen> 3 </since_tizen>
127         public Vector2 LocalPoint
128         {
129             get
130             {
131                 return localPoint;
132             }
133         }
134
135         /// <summary>
136         /// Creates a TapGesture.
137         /// </summary>
138         /// <since_tizen> 3 </since_tizen>
139         public TapGesture() : this(NDalicPINVOKE.new_TapGesture__SWIG_0(), true)
140         {
141             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142         }
143
144
145         private uint numberOfTaps
146         {
147             set
148             {
149                 NDalicPINVOKE.TapGesture_numberOfTaps_set(swigCPtr, value);
150                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151             }
152             get
153             {
154                 uint ret = NDalicPINVOKE.TapGesture_numberOfTaps_get(swigCPtr);
155                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156                 return ret;
157             }
158         }
159
160         private uint numberOfTouches
161         {
162             set
163             {
164                 NDalicPINVOKE.TapGesture_numberOfTouches_set(swigCPtr, value);
165                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166             }
167             get
168             {
169                 uint ret = NDalicPINVOKE.TapGesture_numberOfTouches_get(swigCPtr);
170                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171                 return ret;
172             }
173         }
174
175         private Vector2 screenPoint
176         {
177             set
178             {
179                 NDalicPINVOKE.TapGesture_screenPoint_set(swigCPtr, Vector2.getCPtr(value));
180                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
181             }
182             get
183             {
184                 global::System.IntPtr cPtr = NDalicPINVOKE.TapGesture_screenPoint_get(swigCPtr);
185                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
186                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187                 return ret;
188             }
189         }
190
191         private Vector2 localPoint
192         {
193             set
194             {
195                 NDalicPINVOKE.TapGesture_localPoint_set(swigCPtr, Vector2.getCPtr(value));
196                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197             }
198             get
199             {
200                 global::System.IntPtr cPtr = NDalicPINVOKE.TapGesture_localPoint_get(swigCPtr);
201                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
202                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203                 return ret;
204             }
205         }
206
207     }
208
209 }