Struct PointerEventRef
Represents a reference to a pointer event routed to a view, containing identification and pointer state information.
public ref struct PointerEventRef
- Inherited Members
Constructors
PointerEventRef(PointerEventType, int, long, bool, PointerState, ReadOnlySpan<PointerState>, ReadOnlySpan<PointerState>)
Initializes a new instance of the PointerEventRef struct.
public PointerEventRef(PointerEventType type, int pointerId, long persistentDeviceId, bool isPrimary, PointerState state, ReadOnlySpan<PointerState> coalescedStates, ReadOnlySpan<PointerState> predictedStates)
Parameters
type
PointerEventTypeThe type of pointer event (Down, Move, Up, etc.).
pointerId
intThe unique ID of the pointer.
persistentDeviceId
longThe persistent ID of the physical device, if available.
isPrimary
boolIndicates whether this pointer is the primary pointer.
state
PointerStateThe current physical state of the pointer.
coalescedStates
ReadOnlySpan<PointerState>High-frequency samples coalesced since the last event.
predictedStates
ReadOnlySpan<PointerState>Future-predicted samples for smoothing or latency compensation.
Fields
CoalescedStates
Gets high-frequency coalesced samples recorded between the last and current events.
public readonly ReadOnlySpan<PointerState> CoalescedStates
Field Value
IsPrimary
Gets a value indicating whether this pointer is the primary pointer in a multi-pointer interaction (e.g., first touch).
public readonly bool IsPrimary
Field Value
PersistentDeviceId
Gets the persistent device ID, if known. Identifies the underlying hardware across multiple pointer sessions.
public readonly long PersistentDeviceId
Field Value
PointerId
Gets the unique ID of the pointer. Used to distinguish different active pointers (e.g., different fingers or pen tips).
public readonly int PointerId
Field Value
PredictedStates
Gets future-predicted samples estimated from the current pointer movement.
public readonly ReadOnlySpan<PointerState> PredictedStates
Field Value
State
Gets the current physical state of the pointer (position, pressure, tilt, etc.).
public readonly PointerState State
Field Value
Type
Gets the type of pointer event (e.g., Down, Move, Up, Enter, Leave).
public readonly PointerEventType Type