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