2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 using System.ComponentModel;
22 /// A RotationGesture is emitted when the user moves two fingers in a circular motion.<br />
23 /// A rotation gesture will continue to be sent to the actor under the center point of the rotation until the rotation ends.<br />
25 /// 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.
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public class RotationGesture : Gesture
30 internal RotationGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
36 /// The overall rotation (in radians) from the start of the rotation gesture till the latest rotation gesture.
38 /// 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.
39 [EditorBrowsable(EditorBrowsableState.Never)]
49 /// The center point of the two points that caused the rotation gesture in screen coordinates.
51 /// 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.
52 [EditorBrowsable(EditorBrowsableState.Never)]
53 public Vector2 ScreenCenterPoint
57 return screenCenterPoint;
62 /// The center point of the two points that caused the rotation gesture in local view coordinates.
64 /// 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.
65 [EditorBrowsable(EditorBrowsableState.Never)]
66 public Vector2 LocalCenterPoint
70 return localCenterPoint;
75 /// The default constructor.
77 /// <param name="state">The state of the gesture.</param>
78 /// 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.
79 [EditorBrowsable(EditorBrowsableState.Never)]
80 public RotationGesture(Gesture.StateType state) : this(Interop.RotationGesture.New((int)state), true)
82 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85 private float rotation
89 Interop.RotationGesture.RotationSet(SwigCPtr, value);
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94 float ret = Interop.RotationGesture.RotationGet(SwigCPtr);
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
100 private Vector2 screenCenterPoint
104 Interop.RotationGesture.ScreenCenterPointSet(SwigCPtr, Vector2.getCPtr(value));
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109 global::System.IntPtr cPtr = Interop.RotationGesture.ScreenCenterPointGet(SwigCPtr);
110 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
116 private Vector2 localCenterPoint
120 Interop.RotationGesture.LocalCenterPointSet(SwigCPtr, Vector2.getCPtr(value));
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 global::System.IntPtr cPtr = Interop.RotationGesture.LocalCenterPointGet(SwigCPtr);
126 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RotationGesture obj)
134 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
137 internal static RotationGesture GetRotationGestureFromPtr(global::System.IntPtr cPtr)
139 RotationGesture ret = new RotationGesture(cPtr, false);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 /// This will not be public opened.
145 [EditorBrowsable(EditorBrowsableState.Never)]
146 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
148 Interop.RotationGesture.DeleteRotationGesture(swigCPtr);