/// <summary> /// Creates a platform-independent instance of <see cref="PointerPoint"/> class from WP8-specific objects. /// </summary> /// <param name="type">The pointer event type.</param> /// <param name="point">The WP8-specific instance of pointer point.</param> /// <returns>An instance of <see cref="PointerPoint"/> class.</returns> private void CreateAndAddPoint(PointerEventType type, global::Windows.UI.Input.PointerPoint point) { if (point == null) { throw new ArgumentNullException("point"); } // If we can't access the uiElement (this can happen here), then run this code on the UI thread if (!uiElement.Dispatcher.CheckAccess()) { uiElement.Dispatcher.BeginInvoke(() => CreateAndAddPoint(type, point)); return; } var p = point.Position; var properties = point.Properties; var contactRect = properties.ContactRect; var width = (float)uiElement.ActualWidth; var height = (float)uiElement.ActualHeight; var position = new Vector2((float)p.X / width, (float)p.Y / height); position.Saturate(); var result = new PointerPoint { EventType = type, DeviceType = PointerDeviceType.Touch, KeyModifiers = KeyModifiers.None, PointerId = point.PointerId, Position = position, Timestamp = point.Timestamp, ContactRect = new RectangleF((float)contactRect.X / width, (float)contactRect.Y / height, (float)contactRect.Width / width, (float)contactRect.Height / height), IsBarrelButtonPressed = properties.IsBarrelButtonPressed, IsCanceled = properties.IsCanceled, IsEraser = properties.IsEraser, IsHorizontalMouseWheel = properties.IsHorizontalMouseWheel, IsInRange = properties.IsInRange, IsInverted = properties.IsInverted, IsLeftButtonPressed = properties.IsLeftButtonPressed, IsMiddleButtonPressed = properties.IsMiddleButtonPressed, IsPrimary = properties.IsPrimary, IsRightButtonPressed = properties.IsRightButtonPressed, IsXButton1Pressed = properties.IsXButton1Pressed, IsXButton2Pressed = properties.IsXButton2Pressed, MouseWheelDelta = properties.MouseWheelDelta, Orientation = properties.Orientation, TouchConfidence = properties.TouchConfidence, Twist = properties.Twist, XTilt = properties.XTilt, YTilt = properties.YTilt, PointerUpdateKind = PointerUpdateKind.Other }; manager.AddPointerEvent(ref result); }
public global::Windows.Foundation.Rect ProcessPointerUp(global::Windows.UI.Input.PointerPoint pointerPoint) { throw new global::System.NotImplementedException("The member Rect InkManager.ProcessPointerUp(PointerPoint pointerPoint) is not implemented in Uno."); }
public void ProcessPointerDown(global::Windows.UI.Input.PointerPoint pointerPoint) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Input.Inking.InkManager", "void InkManager.ProcessPointerDown(PointerPoint pointerPoint)"); }
public void ProcessMouseWheelEvent(global::Windows.UI.Input.PointerPoint value, bool isShiftKeyDown, bool isControlKeyDown) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Input.GestureRecognizer", "void GestureRecognizer.ProcessMouseWheelEvent(PointerPoint value, bool isShiftKeyDown, bool isControlKeyDown)"); }
/// <summary> /// Creates a platform-independent instance of <see cref="PointerPoint"/> class from WinRT-specific objects. /// </summary> /// <param name="type">The pointer event type.</param> /// <param name="modifiers">The pressed modifier keys.</param> /// <param name="point">The WinRT-specific instance of pointer point.</param> /// <returns>An instance of <see cref="PointerPoint"/> class.</returns> private void CreateAndAddPoint(PointerEventType type, VirtualKeyModifiers modifiers, global::Windows.UI.Input.PointerPoint point) { if (point == null) { throw new ArgumentNullException("point"); } var position = point.Position; var properties = point.Properties; var contactRect = properties.ContactRect; var result = new PointerPoint { EventType = type, DeviceType = GetDeviceType(point.PointerDevice.PointerDeviceType), KeyModifiers = GetKeyModifiers(modifiers), PointerId = point.PointerId, Position = new Vector2((float)position.X / windowSize.Width, (float)position.Y / windowSize.Height), Timestamp = point.Timestamp, ContactRect = new RectangleF((float)contactRect.X / windowSize.Width, (float)contactRect.Y / windowSize.Height, (float)contactRect.Width / windowSize.Width, (float)contactRect.Height / windowSize.Height), IsBarrelButtonPressed = properties.IsBarrelButtonPressed, IsCanceled = properties.IsCanceled, IsEraser = properties.IsEraser, IsHorizontalMouseWheel = properties.IsHorizontalMouseWheel, IsInRange = properties.IsInRange, IsInverted = properties.IsInverted, IsLeftButtonPressed = properties.IsLeftButtonPressed, IsMiddleButtonPressed = properties.IsMiddleButtonPressed, IsPrimary = properties.IsPrimary, IsRightButtonPressed = properties.IsRightButtonPressed, IsXButton1Pressed = properties.IsXButton1Pressed, IsXButton2Pressed = properties.IsXButton2Pressed, MouseWheelDelta = properties.MouseWheelDelta, Orientation = properties.Orientation, TouchConfidence = properties.TouchConfidence, Twist = properties.Twist, XTilt = properties.XTilt, YTilt = properties.YTilt, PointerUpdateKind = GetPointerUpdateKind(properties.PointerUpdateKind) }; manager.AddPointerEvent(ref result); }
public void TryRedirectForManipulation(global::Windows.UI.Input.PointerPoint pointerPoint) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Composition.Interactions.VisualInteractionSource", "void VisualInteractionSource.TryRedirectForManipulation(PointerPoint pointerPoint)"); }
public global::Windows.UI.Input.Inking.InkStroke EndStroke(global::Windows.UI.Input.PointerPoint pointerPoint) { throw new global::System.NotImplementedException("The member InkStroke InkStrokeBuilder.EndStroke(PointerPoint pointerPoint) is not implemented in Uno."); }
public void BeginStroke(global::Windows.UI.Input.PointerPoint pointerPoint) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Input.Inking.InkStrokeBuilder", "void InkStrokeBuilder.BeginStroke(PointerPoint pointerPoint)"); }
public void ProcessUpEvent(global::Windows.UI.Input.PointerPoint value) { global::Windows.Foundation.Metadata.ApiInformation.TryRaiseNotImplemented("Windows.UI.Input.GestureRecognizer", "void GestureRecognizer.ProcessUpEvent(PointerPoint value)"); }
public bool CanBeDoubleTap(global::Windows.UI.Input.PointerPoint value) { throw new global::System.NotImplementedException("The member bool GestureRecognizer.CanBeDoubleTap(PointerPoint value) is not implemented in Uno."); }