2 * Copyright(c) 2023 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;
18 using Tizen.NUI.BaseComponents;
23 /// MouseInOut is used when the mouse enters or exits a window.
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 public class MouseInOut : Disposable
30 /// The default constructor.
32 [EditorBrowsable(EditorBrowsableState.Never)]
33 public MouseInOut() : this(Interop.MouseInOut.NewMouseInOut((int)MouseInOut.StateType.None, 0, Vector2.getCPtr(new Vector2(0, 0)), 0), true)
35 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
41 /// <param name="state">The state of the event.</param>
42 /// <param name="modifiers">Modifier keys pressed during the event (such as Shift, Alt, and Ctrl).</param>
43 /// <param name="point">The coordinates of the cursor relative to the top-left of the screen.</param>
44 /// <param name="timeStamp">The time the event is being started.</param>
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 public MouseInOut(MouseInOut.StateType state, uint modifiers, Vector2 point, uint timeStamp) : this(Interop.MouseInOut.NewMouseInOut((int)state, modifiers, Vector2.getCPtr(point), timeStamp), true)
48 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
51 internal MouseInOut(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
56 /// The state of the mouse event.
58 [EditorBrowsable(EditorBrowsableState.Never)]
64 [EditorBrowsable(EditorBrowsableState.Never)]
70 [EditorBrowsable(EditorBrowsableState.Never)]
76 [EditorBrowsable(EditorBrowsableState.Never)]
81 /// The state of the mouse event.
83 [EditorBrowsable(EditorBrowsableState.Never)]
84 public MouseInOut.StateType State
93 /// Modifier keys pressed during the event (such as Shift, Alt, and Ctrl).
95 [EditorBrowsable(EditorBrowsableState.Never)]
105 /// The coordinates of the cursor relative to the top-left of the screen.
107 [EditorBrowsable(EditorBrowsableState.Never)]
117 /// The time the mouse evnet is being started
119 [EditorBrowsable(EditorBrowsableState.Never)]
120 public uint TimeStamp
129 /// Get the device class the mouse event originated from.
131 [EditorBrowsable(EditorBrowsableState.Never)]
132 public DeviceClassType DeviceClass
141 /// Get the device subclass the mouse event originated from.
143 [EditorBrowsable(EditorBrowsableState.Never)]
144 public DeviceSubClassType DeviceSubClass
148 return deviceSubClass;
152 private MouseInOut.StateType state
156 MouseInOut.StateType ret = (MouseInOut.StateType)Interop.MouseInOut.TypeGet(SwigCPtr);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162 private uint modifiers
166 uint ret = Interop.MouseInOut.ModifiersGet(SwigCPtr);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 private Vector2 point
176 global::System.IntPtr cPtr = Interop.MouseInOut.PointGet(SwigCPtr);
177 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
178 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 private uint timeStamp
187 uint ret = Interop.MouseInOut.TimeStampGet(SwigCPtr);
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 private DeviceClassType deviceClass
197 int ret = Interop.MouseInOut.DeviceClassGet(SwigCPtr);
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 return (DeviceClassType)ret;
203 private DeviceSubClassType deviceSubClass
207 int ret = Interop.MouseInOut.DeviceSubClassGet(SwigCPtr);
208 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 return (DeviceSubClassType)ret;
213 internal static MouseInOut GetMouseInOutFromPtr(global::System.IntPtr cPtr)
215 MouseInOut ret = new MouseInOut(cPtr, false);
216 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
220 /// This will not be public opened.
221 [EditorBrowsable(EditorBrowsableState.Never)]
222 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
224 Interop.MouseInOut.DeleteMouseInOut(swigCPtr);