// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "NamespaceRedirect.h" #include "DocString.h" namespace Microsoft.ReactNative.Composition.Input { interface KeyboardSource { Microsoft.UI.Input.VirtualKeyStates GetKeyState(Windows.System.VirtualKey key); } interface RoutedEventArgs { Int32 OriginalSource { get; }; } interface KeyRoutedEventArgs requires RoutedEventArgs { String DeviceId { get; }; Boolean Handled { get; set; }; Windows.System.VirtualKey Key { get; }; Microsoft.UI.Input.PhysicalKeyStatus KeyStatus { get; }; Windows.System.VirtualKey OriginalKey { get; }; KeyboardSource KeyboardSource { get; }; } interface CharacterReceivedRoutedEventArgs requires RoutedEventArgs { Boolean Handled { get; set; }; Microsoft.UI.Input.PhysicalKeyStatus KeyStatus { get; }; Int32 KeyCode { get; }; KeyboardSource KeyboardSource { get; }; }; DOC_STRING("Event arguments for context menu key events (SHIFT+F10 or Context Menu key)") interface ContextMenuKeyEventArgs requires RoutedEventArgs { DOC_STRING("Gets or sets whether the event was handled. Set to true to prevent default behavior.") Boolean Handled { get; set; }; }; interface IPointerPointTransform { IPointerPointTransform Inverse { get; }; Boolean TryTransform(Windows.Foundation.Point inPoint, out Windows.Foundation.Point outPoint); Boolean TryTransformBounds(Windows.Foundation.Rect inRect, out Windows.Foundation.Rect outRect); }; enum PointerDeviceType { Touch = 0, Pen, Mouse, Touchpad, }; enum PointerUpdateKind { Other = 0, LeftButtonPressed, LeftButtonReleased, RightButtonPressed, RightButtonReleased, MiddleButtonPressed, MiddleButtonReleased, XButton1Pressed, XButton1Released, XButton2Pressed, XButton2Released, }; runtimeclass Pointer { PointerDeviceType PointerDeviceType { get; }; UInt32 PointerId{ get; }; }; runtimeclass PointerPointProperties { Windows.Foundation.Rect ContactRect { get; }; Boolean IsBarrelButtonPressed { get; }; Boolean IsCanceled { get; }; Boolean IsEraser { get; }; Boolean IsHorizontalMouseWheel { get; }; Boolean IsInRange { get; }; Boolean IsInverted { get; }; Boolean IsLeftButtonPressed { get; }; Boolean IsMiddleButtonPressed { get; }; Boolean IsPrimary { get; }; Boolean IsRightButtonPressed { get; }; Boolean IsXButton1Pressed { get; }; Boolean IsXButton2Pressed { get; }; Int32 MouseWheelDelta { get; }; Single Orientation { get; }; PointerUpdateKind PointerUpdateKind{ get; }; Single Pressure { get; }; Boolean TouchConfidence { get; }; Single Twist { get; }; Single XTilt { get; }; Single YTilt { get; }; }; runtimeclass PointerPoint { UInt32 FrameId { get; }; Boolean IsInContact{ get; }; PointerDeviceType PointerDeviceType { get; }; UInt32 PointerId{ get; }; Windows.Foundation.Point Position { get; }; PointerPointProperties Properties{ get; }; UInt64 Timestamp { get; }; PointerPoint GetOffsetPoint( Windows.Foundation.Point offset); Microsoft.UI.Input.PointerPoint Inner { get; }; }; runtimeclass PointerRoutedEventArgs : RoutedEventArgs { PointerPoint GetCurrentPoint(Int32 tag); Pointer Pointer { get; }; Boolean Handled; Windows.System.VirtualKeyModifiers KeyModifiers { get; }; }; } // namespace Microsoft.ReactNative.Composition.Input