2 * Copyright(c) 2020 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;
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 />
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
31 internal RotationGesture(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.RotationGesture.RotationGesture_SWIGUpcast(cPtr), cMemoryOwn)
37 /// The overall rotation (in radians) from the start of the rotation gesture till the latest rotation gesture.
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)]
50 /// The center point of the two points that caused the rotation gesture in screen coordinates.
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
58 return screenCenterPoint;
63 /// The center point of the two points that caused the rotation gesture in local view coordinates.
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
71 return localCenterPoint;
76 /// The default constructor.
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.RotationGesture_New((int)state), true)
83 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86 private float rotation
90 Interop.RotationGesture.RotationGesture_rotation_set(swigCPtr, value);
91 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 float ret = Interop.RotationGesture.RotationGesture_rotation_get(swigCPtr);
96 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
101 private Vector2 screenCenterPoint
105 Interop.RotationGesture.RotationGesture_screenCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
110 global::System.IntPtr cPtr = Interop.RotationGesture.RotationGesture_screenCenterPoint_get(swigCPtr);
111 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 private Vector2 localCenterPoint
121 Interop.RotationGesture.RotationGesture_localCenterPoint_set(swigCPtr, Vector2.getCPtr(value));
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126 global::System.IntPtr cPtr = Interop.RotationGesture.RotationGesture_localCenterPoint_get(swigCPtr);
127 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RotationGesture obj)
135 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
138 internal static RotationGesture GetRotationGestureFromPtr(global::System.IntPtr cPtr)
140 RotationGesture ret = new RotationGesture(cPtr, false);
141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 /// This will not be public opened.
146 [EditorBrowsable(EditorBrowsableState.Never)]
147 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
149 Interop.RotationGesture.delete_RotationGesture(swigCPtr);