--- /dev/null
+/*
+ * Copyright(c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class MouseRelative
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_MouseRelativeEvent__SWIG_0")]
+ public static extern global::System.IntPtr NewMouseRelative(int jarg1, uint jarg2, uint jarg3, global::System.Runtime.InteropServices.HandleRef jarg4, global::System.Runtime.InteropServices.HandleRef jarg5);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_MouseRelativeEvent")]
+ public static extern void DeleteMouseRelative(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_type_get")]
+ public static extern int TypeGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_modifiers_get")]
+ public static extern uint ModifiersGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_diff_position_get")]
+ public static extern global::System.IntPtr DiffPositionGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_unaccelated_position_get")]
+ public static extern global::System.IntPtr UnaccelatedPositionGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_timeStamp_get")]
+ public static extern uint TimeStampGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_GetDeviceClass")]
+ public static extern int DeviceClassGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_MouseRelativeEvent_GetDeviceSubClass")]
+ public static extern int DeviceSubClassGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_KeepRendering")]
public static extern void KeepRendering(global::System.Runtime.InteropServices.HandleRef window, float durationSeconds);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_PointerConstraintsLock")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool PointerConstraintsLock(global::System.Runtime.InteropServices.HandleRef window);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_PointerConstraintsUnlock")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool PointerConstraintsUnlock(global::System.Runtime.InteropServices.HandleRef window);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_LockedPointerRegionSet")]
+ public static extern void LockedPointerRegionSet(global::System.Runtime.InteropServices.HandleRef window, int x, int y, int w, int h);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_LockedPointerCursorPositionHintSet")]
+ public static extern void LockedPointerCursorPositionHintSet(global::System.Runtime.InteropServices.HandleRef window, int x, int y);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_PointerWarp")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool PointerWarp(global::System.Runtime.InteropServices.HandleRef window, int x, int y);
}
}
}
--- /dev/null
+/*
+ * Copyright(c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WindowMouseRelativeEventSignal
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WindowMouseRelativeEventSignal")]
+ public static extern global::System.IntPtr GetSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WindowMouseRelativeEventSignal_Empty")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WindowMouseRelativeEventSignal_GetConnectionCount")]
+ public static extern uint GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WindowMouseRelativeEventSignal_Connect")]
+ public static extern void Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WindowMouseRelativeEventSignal_Disconnect")]
+ public static extern void Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WindowMouseRelativeEventSignal_Emit")]
+ public static extern void Emit(global::System.Runtime.InteropServices.HandleRef signalType, global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef mouseEvent);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_WindowMouseRelativeEventSignal")]
+ public static extern global::System.IntPtr NewWindowMouseRelativeEventSignal();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WindowMouseRelativeEventSignal")]
+ public static extern void DeleteWindowMouseRelativeEventSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI
+{
+ internal class WindowMouseRelativeEventSignal : Disposable
+ {
+ internal WindowMouseRelativeEventSignal(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// Dispose
+ /// </summary>
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WindowMouseRelativeEventSignal.DeleteWindowMouseRelativeEventSignal(swigCPtr);
+ }
+
+ /// <summary>
+ /// Queries whether there are any connected slots.
+ /// </summary>
+ /// <returns>True if there are any slots connected to the signal</returns>
+ public bool Empty()
+ {
+ bool ret = Interop.WindowMouseRelativeEventSignal.Empty(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Queries the number of slots.
+ /// </summary>
+ /// <returns>The number of slots connected to this signal</returns>
+ public uint GetConnectionCount()
+ {
+ uint ret = Interop.WindowMouseRelativeEventSignal.GetConnectionCount(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Connects a function.
+ /// </summary>
+ /// <param name="func">The function to connect</param>
+ public void Connect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+ {
+ Interop.WindowMouseRelativeEventSignal.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// <summary>
+ /// Disconnects a function.
+ /// </summary>
+ /// <param name="func">The function to disconnect</param>
+ public void Disconnect(System.Delegate func)
+ {
+ System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
+ {
+ Interop.WindowMouseRelativeEventSignal.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+
+ /// <summary>
+ /// Emits the signal.
+ /// </summary>
+ /// <param name="window">The first value to pass to callbacks</param>
+ /// <param name="MouseRelative">The second value to pass to callbacks</param>
+ public void Emit(Window window, MouseRelative MouseRelative)
+ {
+ Interop.WindowMouseRelativeEventSignal.Emit(SwigCPtr, Window.getCPtr(window), MouseRelative.getCPtr(MouseRelative));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// The constructor.
+ /// </summary>
+ public WindowMouseRelativeEventSignal(Window window) : this(Interop.WindowMouseRelativeEventSignal.GetSignal(Window.getCPtr(window)), false)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2023 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System.ComponentModel;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// MouseRelative is used when relative mouse movement occurs in the window.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class MouseRelative : Disposable
+ {
+
+ /// <summary>
+ /// The default constructor.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MouseRelative() : this(Interop.MouseRelative.NewMouseRelative((int)MouseRelative.StateType.None, 0, 0, Vector2.getCPtr(new Vector2(0, 0)), Vector2.getCPtr(new Vector2(0, 0))), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// The constructor.
+ /// </summary>
+ /// <param name="state">The state of the event.</param>
+ /// <param name="modifiers">Modifier keys pressed during the event (such as Shift, Alt, and Ctrl).</param>
+ /// <param name="timeStamp">The time the event is being started.</param>
+ /// <param name="diffPosition">The coordinates of the cursor relative to the top-left of the screen.</param>
+ /// <param name="unaccelatedPosition">The coordinates of the cursor relative to the top-left of the screen.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MouseRelative(MouseRelative.StateType state, uint modifiers, uint timeStamp, Vector2 diffPosition, Vector2 unaccelatedPosition) : this(Interop.MouseRelative.NewMouseRelative((int)state, modifiers, timeStamp, Vector2.getCPtr(diffPosition), Vector2.getCPtr(unaccelatedPosition)), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal MouseRelative(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// The state of the mouse event.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum StateType
+ {
+ /// <summary>
+ /// Default value
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ None,
+
+ /// <summary>
+ /// Mouse exited
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ RelativeMove
+ }
+
+ /// <summary>
+ /// Gets the state of the mouse relative event.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MouseRelative.StateType State
+ {
+ get
+ {
+ return state;
+ }
+ }
+
+ /// <summary>
+ /// Gets the modifier keys pressed during the event (such as Shift, Alt, and Ctrl).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint Modifiers
+ {
+ get
+ {
+ return modifiers;
+ }
+ }
+
+ /// <summary>
+ /// Gets the diff postion (accelated - default)
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Vector2 DiffPosition
+ {
+ get
+ {
+ return diffPosition;
+ }
+ }
+
+ /// <summary>
+ /// Gets the unaccelated postion (accelated - default)
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Vector2 UnaccelatedPosition
+ {
+ get
+ {
+ return unaccelatedPosition;
+ }
+ }
+
+ /// <summary>
+ /// Gets the time the mouse relative evnet is being started
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint TimeStamp
+ {
+ get
+ {
+ return timeStamp;
+ }
+ }
+
+ /// <summary>
+ /// Gets the device class the mouse relative event originated from.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public DeviceClassType DeviceClass
+ {
+ get
+ {
+ return deviceClass;
+ }
+ }
+
+ /// <summary>
+ /// Gets the device subclass the mouse relative event originated from.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public DeviceSubClassType DeviceSubClass
+ {
+ get
+ {
+ return deviceSubClass;
+ }
+ }
+
+ private MouseRelative.StateType state
+ {
+ get
+ {
+ MouseRelative.StateType ret = (MouseRelative.StateType)Interop.MouseRelative.TypeGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ private uint modifiers
+ {
+ get
+ {
+ uint ret = Interop.MouseRelative.ModifiersGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ private Vector2 diffPosition
+ {
+ get
+ {
+ global::System.IntPtr cPtr = Interop.MouseRelative.DiffPositionGet(SwigCPtr);
+ Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ private Vector2 unaccelatedPosition
+ {
+ get
+ {
+ global::System.IntPtr cPtr = Interop.MouseRelative.UnaccelatedPositionGet(SwigCPtr);
+ Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ private uint timeStamp
+ {
+ get
+ {
+ uint ret = Interop.MouseRelative.TimeStampGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ private DeviceClassType deviceClass
+ {
+ get
+ {
+ int ret = Interop.MouseRelative.DeviceClassGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return (DeviceClassType)ret;
+ }
+ }
+
+ private DeviceSubClassType deviceSubClass
+ {
+ get
+ {
+ int ret = Interop.MouseRelative.DeviceSubClassGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return (DeviceSubClassType)ret;
+ }
+ }
+
+ internal static MouseRelative GetMouseRelativeFromPtr(global::System.IntPtr cPtr)
+ {
+ MouseRelative ret = new MouseRelative(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.MouseRelative.DeleteMouseRelative(swigCPtr);
+ }
+ }
+}
}
/// <summary>
+ /// Sets the pointer constraints lock.
+ /// </summary>
+ /// <returns>True if PointerConstraintsLock succeeds.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool PointerConstraintsLock()
+ {
+ bool ret = Interop.Window.PointerConstraintsLock(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Sets the pointer constraints unlock.
+ /// </summary>
+ /// <returns>True if PointerConstraintsUnlock succeeds.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool PointerConstraintsUnlock()
+ {
+ bool ret = Interop.Window.PointerConstraintsUnlock(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Sets the locked pointer region.
+ /// </summary>
+ /// <param name="x">The x position.</param>
+ /// <param name="y">The y position.</param>
+ /// <param name="width">The width.</param>
+ /// <param name="height">The height.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void LockedPointerRegionSet(int x, int y, int width, int height)
+ {
+ Interop.Window.LockedPointerRegionSet(SwigCPtr, x, y, width, height);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Sets the locked pointer cursor position hintset
+ /// </summary>
+ /// <param name="x">The x position.</param>
+ /// <param name="y">The y position.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void LockedPointerCursorPositionHintSet(int x, int y)
+ {
+ Interop.Window.LockedPointerCursorPositionHintSet(SwigCPtr, x, y);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Sets the pointer warp. The pointer moves to the set coordinates.
+ /// </summary>
+ /// <param name="x">The x position.</param>
+ /// <param name="y">The y position.</param>
+ /// <returns>True if PointerWarp succeeds.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool PointerWarp(int x, int y)
+ {
+ bool ret = Interop.Window.PointerWarp(SwigCPtr, x, y);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
/// Maximizes window's size.
/// If this function is called with true, window will be resized with screen size.
/// Otherwise window will be resized with previous size.
private KeyboardRepeatSettingsChangedEventCallbackType keyboardRepeatSettingsChangedEventCallback;
private AuxiliaryMessageEventCallbackType auxiliaryMessageEventCallback;
private WindowMouseInOutEventCallbackType windowMouseInOutEventCallback;
+ private WindowMouseRelativeEventCallbackType windowMouseRelativeEventCallback;
private MoveCompletedEventCallbackType moveCompletedEventCallback;
private ResizeCompletedEventCallbackType resizeCompletedEventCallback;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void WindowMouseInOutEventCallbackType(IntPtr window, IntPtr mouseEvent);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+ private delegate void WindowMouseRelativeEventCallbackType(IntPtr window, IntPtr mouseEvent);
+ [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void MoveCompletedEventCallbackType(IntPtr window, IntPtr position);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void ResizeCompletedEventCallbackType(IntPtr window, IntPtr size);
}
}
+ /// <summary>
+ /// Emits the event when relative mouse movement occurs in the window.<br />
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public event EventHandler<MouseRelativeEventArgs> MouseRelativeEvent
+ {
+ add
+ {
+ if (windowMouseRelativeEventHandler == null)
+ {
+ windowMouseRelativeEventCallback = OnWindowMouseRelativeEvent;
+ using WindowMouseRelativeEventSignal signal = new WindowMouseRelativeEventSignal(Interop.WindowMouseRelativeEventSignal.GetSignal(SwigCPtr), false);
+ signal?.Connect(windowMouseRelativeEventCallback);
+ }
+ windowMouseRelativeEventHandler += value;
+ }
+ remove
+ {
+ windowMouseRelativeEventHandler -= value;
+ if (windowMouseRelativeEventHandler == null && windowMouseRelativeEventCallback != null)
+ {
+ using WindowMouseRelativeEventSignal signal = new WindowMouseRelativeEventSignal(Interop.WindowMouseRelativeEventSignal.GetSignal(SwigCPtr), false);
+ signal?.Disconnect(windowMouseRelativeEventCallback);
+ windowMouseRelativeEventCallback = null;
+ }
+ }
+ }
+
private event EventHandler<FocusChangedEventArgs> windowFocusChangedEventHandler;
private event EventHandler<TouchEventArgs> rootLayerTouchDataEventHandler;
private ReturnTypeEventHandler<object, TouchEventArgs, bool> rootLayerInterceptTouchDataEventHandler;
private event EventHandler keyboardRepeatSettingsChangedHandler;
private event EventHandler<AuxiliaryMessageEventArgs> auxiliaryMessageEventHandler;
private event EventHandler<MouseInOutEventArgs> windowMouseInOutEventHandler;
+ private event EventHandler<MouseRelativeEventArgs> windowMouseRelativeEventHandler;
private event EventHandler<WindowMoveCompletedEventArgs> moveCompletedHandler;
private event EventHandler<WindowResizeCompletedEventArgs> resizeCompletedHandler;
windowMouseInOutEventCallback = null;
}
+ if (windowMouseRelativeEventCallback != null)
+ {
+ using WindowMouseRelativeEventSignal signal = new WindowMouseRelativeEventSignal(Interop.WindowMouseRelativeEventSignal.GetSignal(GetBaseHandleCPtrHandleRef), false);
+ signal?.Disconnect(windowMouseRelativeEventCallback);
+ windowMouseRelativeEventCallback = null;
+ }
+
if (moveCompletedEventCallback != null)
{
using WindowMoveCompletedSignal signal = new WindowMoveCompletedSignal(Interop.WindowMoveCompletedSignal.GetSignal(GetBaseHandleCPtrHandleRef), false);
return;
}
+ private void OnWindowMouseRelativeEvent(IntPtr view, IntPtr mouseEvent)
+ {
+ if (mouseEvent == global::System.IntPtr.Zero)
+ {
+ NUILog.Error("mouseEvent should not be null!");
+ return;
+ }
+
+ if (windowMouseRelativeEventHandler != null)
+ {
+ MouseRelativeEventArgs e = new MouseRelativeEventArgs();
+ e.MouseRelative = Tizen.NUI.MouseRelative.GetMouseRelativeFromPtr(mouseEvent);
+ windowMouseRelativeEventHandler(this, e);
+ }
+ }
+
/// <summary>
/// The focus changed event argument.
/// </summary>
}
/// <summary>
+ /// MouseRelative evnet arguments.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class MouseRelativeEventArgs : EventArgs
+ {
+ private MouseRelative mouseEvent;
+
+ /// <summary>
+ /// MouseRelative event.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MouseRelative MouseRelative
+ {
+ get
+ {
+ return mouseEvent;
+ }
+ set
+ {
+ mouseEvent = value;
+ }
+ }
+ }
+
+ /// <summary>
/// Do not use this, that will be deprecated.
/// </summary>
/// <since_tizen> 3 </since_tizen>