100 references to UnsafeNativeMethods
PresentationCore (100)
System\Windows\Input\Stylus\Pointer\PointerData.cs (1)
10using static MS.Win32.Pointer.UnsafeNativeMethods;
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (39)
52private static List<UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION> DefaultConfiguration = 53new List<UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION>() 55new UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION() 57enable = UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_TAP, 58interactionId = UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_TAP 60new UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION() 62enable = UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_HOLD, 63interactionId = UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_HOLD 65new UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION() 67enable = UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_SECONDARY_TAP, 68interactionId = UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_SECONDARY_TAP 70new UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION() 72enable = UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_MANIPULATION 73| UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_INERTIA 74| UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_X 75| UnsafeNativeMethods.INTERACTION_CONFIGURATION_FLAGS.INTERACTION_CONFIGURATION_FLAG_MANIPULATION_TRANSLATION_Y, 76interactionId = UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_MANIPULATION 112private UnsafeNativeMethods.INTERACTION_CONTEXT_OUTPUT_CALLBACK _callbackDelegate; 166internal PointerInteractionEngine(PointerStylusDevice stylusDevice, List<UnsafeNativeMethods.INTERACTION_CONTEXT_CONFIGURATION> configuration = null) 179UnsafeNativeMethods.CreateInteractionContext(out interactionContext); 190UnsafeNativeMethods.SetPropertyInteractionContext(_interactionContext.Value, 191UnsafeNativeMethods.INTERACTION_CONTEXT_PROPERTY.INTERACTION_CONTEXT_PROPERTY_FILTER_POINTERS, 195UnsafeNativeMethods.SetPropertyInteractionContext(_interactionContext.Value, 196UnsafeNativeMethods.INTERACTION_CONTEXT_PROPERTY.INTERACTION_CONTEXT_PROPERTY_MEASUREMENT_UNITS, 197(UInt32)UnsafeNativeMethods.InteractionMeasurementUnits.Screen); 200UnsafeNativeMethods.SetInteractionConfigurationInteractionContext(_interactionContext.Value, (uint)configuration.Count, configuration.ToArray()); 206UnsafeNativeMethods.RegisterOutputCallbackInteractionContext(_interactionContext.Value, _callbackDelegate); 227UnsafeNativeMethods.DestroyInteractionContext(_interactionContext.Value); 260UnsafeNativeMethods.BufferPointerPacketsInteractionContext(_interactionContext.Value, 1, new UnsafeNativeMethods.POINTER_INFO[] { _stylusDevice.CurrentPointerInfo }); 270UnsafeNativeMethods.ProcessBufferedPacketsInteractionContext(_interactionContext.Value); 286private void Callback(IntPtr clientData, ref UnsafeNativeMethods.INTERACTION_CONTEXT_OUTPUT output) 293case UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_TAP: 298case UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_SECONDARY_TAP: 303case UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_HOLD: 307if (output.interactionFlags.HasFlag(UnsafeNativeMethods.INTERACTION_FLAGS.INTERACTION_FLAG_BEGIN)) 317case UnsafeNativeMethods.INTERACTION_ID.INTERACTION_ID_MANIPULATION: 477private SystemGesture DetectDragOrFlick(UnsafeNativeMethods.INTERACTION_CONTEXT_OUTPUT output) 481if (output.interactionFlags.HasFlag(UnsafeNativeMethods.INTERACTION_FLAGS.INTERACTION_FLAG_END))
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (22)
93private UnsafeNativeMethods.POINTER_DEVICE_CURSOR_INFO _cursorInfo = new UnsafeNativeMethods.POINTER_DEVICE_CURSOR_INFO(); 114internal PointerStylusDevice(PointerTabletDevice tabletDevice, UnsafeNativeMethods.POINTER_DEVICE_CURSOR_INFO cursorInfo) 202internal UnsafeNativeMethods.POINTER_INFO CurrentPointerInfo { get { return _pointerData.Info; } } 222return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_NEW) ?? false; 230return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INCONTACT) ?? false; 238return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_PRIMARY) ?? false; 246return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_FIRSTBUTTON) ?? false; 254return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_SECONDBUTTON) ?? false; 262return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_THIRDBUTTON) ?? false; 270return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_FOURTHBUTTON) ?? false; 278return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_FIFTHBUTTON) ?? false; 294return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_DOWN) ?? false; 302return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_UPDATE) ?? false; 310return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_UP) ?? false; 318return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_CAPTURECHANGED) ?? false; 326return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_HASTRANSFORM) ?? false; 440return (_cursorInfo.cursor == UnsafeNativeMethods.POINTER_DEVICE_CURSOR_TYPE.POINTER_DEVICE_CURSOR_TYPE_ERASER) 468return !(_pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INCONTACT) ?? false) 469&& (_pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INRANGE) ?? false); 481&& (_pointerData?.PenInfo.penFlags.HasFlag(UnsafeNativeMethods.PEN_FLAGS.PEN_FLAG_INVERTED) ?? false); 492return _pointerData?.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INRANGE) ?? false;
System\Windows\Input\Stylus\Pointer\PointerStylusPointPropertyInfoHelper.cs (1)
63internal static StylusPointPropertyInfo CreatePropertyInfo(UnsafeNativeMethods.POINTER_DEVICE_PROPERTY prop)
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (4)
102if (UnsafeNativeMethods.GetPointerDeviceCursors(_deviceInfo.Device, ref cursorCount, null)) 104UnsafeNativeMethods.POINTER_DEVICE_CURSOR_INFO[] cursors = new UnsafeNativeMethods.POINTER_DEVICE_CURSOR_INFO[cursorCount]; 106if (UnsafeNativeMethods.GetPointerDeviceCursors(_deviceInfo.Device, ref cursorCount, cursors))
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (4)
90IsValid = UnsafeNativeMethods.GetPointerDevices(ref deviceCount, null); 94UnsafeNativeMethods.POINTER_DEVICE_INFO[] deviceInfos 95= new UnsafeNativeMethods.POINTER_DEVICE_INFO[deviceCount]; 97IsValid = UnsafeNativeMethods.GetPointerDevices(ref deviceCount, deviceInfos);
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceInfo.cs (23)
25private UnsafeNativeMethods.POINTER_DEVICE_INFO _deviceInfo; 34internal UnsafeNativeMethods.POINTER_DEVICE_PROPERTY[] SupportedPointerProperties { get; private set; } 60internal UnsafeNativeMethods.RECT DeviceRect { get; private set; } = new UnsafeNativeMethods.RECT(); 65internal UnsafeNativeMethods.RECT DisplayRect { get; private set; } = new UnsafeNativeMethods.RECT(); 75internal PointerTabletDeviceInfo(int id, UnsafeNativeMethods.POINTER_DEVICE_INFO deviceInfo) 121case UnsafeNativeMethods.POINTER_DEVICE_TYPE.POINTER_DEVICE_TYPE_EXTERNAL_PEN: 126case UnsafeNativeMethods.POINTER_DEVICE_TYPE.POINTER_DEVICE_TYPE_INTEGRATED_PEN: 132case UnsafeNativeMethods.POINTER_DEVICE_TYPE.POINTER_DEVICE_TYPE_TOUCH: 138case UnsafeNativeMethods.POINTER_DEVICE_TYPE.POINTER_DEVICE_TYPE_TOUCH_PAD: 182success = UnsafeNativeMethods.GetPointerDeviceProperties(Device, ref propCount, null); 186SupportedPointerProperties = new UnsafeNativeMethods.POINTER_DEVICE_PROPERTY[propCount]; 188success = UnsafeNativeMethods.GetPointerDeviceProperties(Device, ref propCount, SupportedPointerProperties); 203List<UnsafeNativeMethods.POINTER_DEVICE_PROPERTY> supportedProperties = new List<UnsafeNativeMethods.POINTER_DEVICE_PROPERTY>() 205new UnsafeNativeMethods.POINTER_DEVICE_PROPERTY(), 206new UnsafeNativeMethods.POINTER_DEVICE_PROPERTY(), 209List<UnsafeNativeMethods.POINTER_DEVICE_PROPERTY> supportedButtonProperties = new List<UnsafeNativeMethods.POINTER_DEVICE_PROPERTY>(); 294var deviceRect = new UnsafeNativeMethods.RECT(); 295var displayRect = new UnsafeNativeMethods.RECT(); 297success = UnsafeNativeMethods.GetPointerDeviceRects(_deviceInfo.device, ref deviceRect, ref displayRect);
System\Windows\InterOp\HwndPointerInputProvider.cs (6)
154if (UnsafeNativeMethods.GetRawPointerDeviceData( 224&& (data.Info.pointerType == UnsafeNativeMethods.POINTER_INPUT_TYPE.PT_TOUCH 225|| data.Info.pointerType == UnsafeNativeMethods.POINTER_INPUT_TYPE.PT_PEN)) 229if (UnsafeNativeMethods.GetPointerCursorId(pointerId, ref cursorId)) 242&& (!data.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INCONTACT) 243&& data.Info.pointerFlags.HasFlag(UnsafeNativeMethods.POINTER_FLAGS.POINTER_FLAG_INRANGE)))