Table of Contents

Struct PointerEventRef

Namespace
Xui.Core.UI.Input
Assembly
Xui.Core.dll

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>, ITextMeasureContext?)

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, ITextMeasureContext? textMeasure = null)

Parameters

type PointerEventType
pointerId int
persistentDeviceId long
isPrimary bool
state PointerState
coalescedStates ReadOnlySpan<PointerState>
predictedStates ReadOnlySpan<PointerState>
textMeasure ITextMeasureContext

Fields

CoalescedStates

Gets high-frequency coalesced samples recorded between the last and current events.

public readonly ReadOnlySpan<PointerState> CoalescedStates

Field Value

ReadOnlySpan<PointerState>

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

bool

PersistentDeviceId

Gets the persistent device ID, if known. Identifies the underlying hardware across multiple pointer sessions.

public readonly long PersistentDeviceId

Field Value

long

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

int

PredictedStates

Gets future-predicted samples estimated from the current pointer movement.

public readonly ReadOnlySpan<PointerState> PredictedStates

Field Value

ReadOnlySpan<PointerState>

State

Gets the current physical state of the pointer (position, pressure, tilt, etc.).

public readonly PointerState State

Field Value

PointerState

TextMeasure

Optional text measure context for hit-testing text positions. May be null on platforms that do not provide one.

public readonly ITextMeasureContext? TextMeasure

Field Value

ITextMeasureContext

Type

Gets the type of pointer event (e.g., Down, Move, Up, Enter, Leave).

public readonly PointerEventType Type

Field Value

PointerEventType