[NUI] Fixing the emtpy finalizers(CA1821)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / TapGesture.cs
1 /*
2  * Copyright(c) 2020 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 using System.ComponentModel;
18
19 namespace Tizen.NUI
20 {
21
22     /// <summary>
23     /// A TapGesture is emitted when the user taps the screen with the stated number of fingers a stated number of times.
24     /// </summary>
25     /// <since_tizen> 3 </since_tizen>
26     public class TapGesture : Gesture
27     {
28
29         /// <summary>
30         /// Creates a TapGesture.
31         /// </summary>
32         /// <since_tizen> 3 </since_tizen>
33         public TapGesture() : this(Interop.TapGesture.New(0), true)
34         {
35             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
36         }
37
38         internal TapGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TapGesture.Upcast(cPtr), cMemoryOwn)
39         {
40         }
41
42         /// <summary>
43         /// The number of taps property (read-only).
44         /// </summary>
45         /// <since_tizen> 3 </since_tizen>
46         public uint NumberOfTaps
47         {
48             get
49             {
50                 return numberOfTaps;
51             }
52         }
53
54         /// <summary>
55         /// The number of touches property (read-only).
56         /// </summary>
57         /// <since_tizen> 3 </since_tizen>
58         public uint NumberOfTouches
59         {
60             get
61             {
62                 return numberOfTouches;
63             }
64         }
65
66         /// <summary>
67         /// The screen point property (read-only).
68         /// </summary>
69         /// <since_tizen> 3 </since_tizen>
70         public Vector2 ScreenPoint
71         {
72             get
73             {
74                 return screenPoint;
75             }
76         }
77
78         /// <summary>
79         /// The local point property (read-only).
80         /// </summary>
81         /// <since_tizen> 3 </since_tizen>
82         public Vector2 LocalPoint
83         {
84             get
85             {
86                 return localPoint;
87             }
88         }
89
90         private uint numberOfTaps
91         {
92             set
93             {
94                 Interop.TapGesture.NumberOfTapsSet(SwigCPtr, value);
95                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96             }
97             get
98             {
99                 uint ret = Interop.TapGesture.NumberOfTapsGet(SwigCPtr);
100                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101                 return ret;
102             }
103         }
104
105         private uint numberOfTouches
106         {
107             set
108             {
109                 Interop.TapGesture.NumberOfTouchesSet(SwigCPtr, value);
110                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111             }
112             get
113             {
114                 uint ret = Interop.TapGesture.NumberOfTouchesGet(SwigCPtr);
115                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116                 return ret;
117             }
118         }
119
120         private Vector2 screenPoint
121         {
122             set
123             {
124                 Interop.TapGesture.ScreenPointSet(SwigCPtr, Vector2.getCPtr(value));
125                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126             }
127             get
128             {
129                 global::System.IntPtr cPtr = Interop.TapGesture.ScreenPointGet(SwigCPtr);
130                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
131                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132                 return ret;
133             }
134         }
135
136         private Vector2 localPoint
137         {
138             set
139             {
140                 Interop.TapGesture.LocalPointSet(SwigCPtr, Vector2.getCPtr(value));
141                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142             }
143             get
144             {
145                 global::System.IntPtr cPtr = Interop.TapGesture.LocalPointGet(SwigCPtr);
146                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
147                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148                 return ret;
149             }
150         }
151
152         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TapGesture obj)
153         {
154             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
155         }
156
157         /// <summary>
158         /// Gets the TapGesture from the pointer.
159         /// </summary>
160         /// <param name="cPtr">The pointer to cast.</param>
161         /// <returns>The TapGesture object.</returns>
162         internal static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr)
163         {
164             TapGesture ret = new TapGesture(cPtr, false);
165             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166             return ret;
167         }
168
169         /// This will not be public opened.
170         [EditorBrowsable(EditorBrowsableState.Never)]
171         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
172         {
173             Interop.TapGesture.DeleteTapGesture(swigCPtr);
174         }
175     }
176 }