[NUI] Fix build warning[CA1064]
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / RotationGesture.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 RotationGesture is emitted when the user moves two fingers in a circular motion.<br />
24     /// A rotation gesture will continue to be sent to the actor under the center point of the rotation until the rotation ends.<br />
25     /// </summary>
26     /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API.
27     [EditorBrowsable(EditorBrowsableState.Never)]
28     public class RotationGesture : Gesture
29     {
30
31         internal RotationGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RotationGesture.Upcast(cPtr), cMemoryOwn)
32         {
33         }
34
35
36         /// <summary>
37         /// The overall rotation (in radians) from the start of the rotation gesture till the latest rotation gesture.
38         /// </summary>
39         /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API.
40         [EditorBrowsable(EditorBrowsableState.Never)]
41         public float Rotation
42         {
43             get
44             {
45                 return rotation;
46             }
47         }
48
49         /// <summary>
50         /// The center point of the two points that caused the rotation gesture in screen coordinates.
51         /// </summary>
52         /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API.
53         [EditorBrowsable(EditorBrowsableState.Never)]
54         public Vector2 ScreenCenterPoint
55         {
56             get
57             {
58                 return screenCenterPoint;
59             }
60         }
61
62         /// <summary>
63         /// The center point of the two points that caused the rotation gesture in local view coordinates.
64         /// </summary>
65         /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API.
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public Vector2 LocalCenterPoint
68         {
69             get
70             {
71                 return localCenterPoint;
72             }
73         }
74
75         /// <summary>
76         /// The default constructor.
77         /// </summary>
78         /// <param name="state">The state of the gesture.</param>
79         /// This will be made public in the next tizen release after an ACR is done. Till then, it needs to be hidden as an inhouse API.
80         [EditorBrowsable(EditorBrowsableState.Never)]
81         public RotationGesture(Gesture.StateType state) : this(Interop.RotationGesture.New((int)state), true)
82         {
83             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84         }
85
86         private float rotation
87         {
88             set
89             {
90                 Interop.RotationGesture.RotationSet(swigCPtr, value);
91                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92             }
93             get
94             {
95                 float ret = Interop.RotationGesture.RotationGet(swigCPtr);
96                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
97                 return ret;
98             }
99         }
100
101         private Vector2 screenCenterPoint
102         {
103             set
104             {
105                 Interop.RotationGesture.ScreenCenterPointSet(swigCPtr, Vector2.getCPtr(value));
106                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
107             }
108             get
109             {
110                 global::System.IntPtr cPtr = Interop.RotationGesture.ScreenCenterPointGet(swigCPtr);
111                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
112                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
113                 return ret;
114             }
115         }
116
117         private Vector2 localCenterPoint
118         {
119             set
120             {
121                 Interop.RotationGesture.LocalCenterPointSet(swigCPtr, Vector2.getCPtr(value));
122                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
123             }
124             get
125             {
126                 global::System.IntPtr cPtr = Interop.RotationGesture.LocalCenterPointGet(swigCPtr);
127                 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
128                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129                 return ret;
130             }
131         }
132
133         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RotationGesture obj)
134         {
135             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
136         }
137
138         internal static RotationGesture GetRotationGestureFromPtr(global::System.IntPtr cPtr)
139         {
140             RotationGesture ret = new RotationGesture(cPtr, false);
141             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142             return ret;
143         }
144
145         /// This will not be public opened.
146         [EditorBrowsable(EditorBrowsableState.Never)]
147         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
148         {
149             Interop.RotationGesture.DeleteRotationGesture(swigCPtr);
150         }
151     }
152 }