GuiPanelGestureEvent struct
One recognised gesture on a GUI panel, copied out of the native callback.
Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll · Source: QarTypes.cs
public readonly struct GuiPanelGestureEvent
Remarks
Several producers publish on one panel, one per user. Key lifecycles on
(GuiPanelGestureEvent.SourcePeerId, GuiPanelGestureEvent.GestureId): the id is unique only
within a source peer.
Constructors
GuiPanelGestureEvent(PeerId, ulong, GuiPanelId, GuiPanelGestureKind, GesturePhase, GuiPanelPoint, GuiPanelPoint, TimePoint, Handedness, byte)
public GuiPanelGestureEvent(PeerId sourcePeerId, ulong gestureId, GuiPanelId panelId, GuiPanelGestureKind kind, GesturePhase phase, GuiPanelPoint position, GuiPanelPoint startPosition, TimePoint timestamp, Handedness handedness, byte tapCount)
Parameters
| Name | Type | Description |
|---|---|---|
sourcePeerId | PeerId | |
gestureId | ulong | |
panelId | GuiPanelId | |
kind | GuiPanelGestureKind | |
phase | GesturePhase | |
position | GuiPanelPoint | |
startPosition | GuiPanelPoint | |
timestamp | TimePoint | |
handedness | Handedness | |
tapCount | byte |
Properties
| Member | Description |
|---|---|
| SourcePeerId | The peer whose hand made the contact, not the peer that recognised it. |
| GestureId | Non-zero and stable for one hover or drag lifecycle; 0 for tap and long press. |
| PanelId | |
| Kind | |
| Phase | |
| Position | Where the contact is now, in panel-content-space pixels. |
| StartPosition | Where this lifecycle began, in panel-content-space pixels; equals GuiPanelGestureEvent.Position for instant kinds. |
| Timestamp | When the recogniser emitted it, as UTC wall-clock time on its host; comparable only within one source peer. |
| Handedness | The hand that made the contact; Handedness.Unspecified when the recogniser did not tell. |
| TapCount | Taps in this run for GuiPanelGestureKind.Tap; 0 for every other kind. |
SourcePeerId
The peer whose hand made the contact, not the peer that recognised it.
public PeerId SourcePeerId { get; }
Value: PeerId
GestureId
Non-zero and stable for one hover or drag lifecycle; 0 for tap and long press.
public ulong GestureId { get; }
Value: ulong
PanelId
public GuiPanelId PanelId { get; }
Value: GuiPanelId
Kind
public GuiPanelGestureKind Kind { get; }
Value: GuiPanelGestureKind
Phase
public GesturePhase Phase { get; }
Value: GesturePhase
Position
Where the contact is now, in panel-content-space pixels.
public GuiPanelPoint Position { get; }
Value: GuiPanelPoint
StartPosition
Where this lifecycle began, in panel-content-space pixels; equals GuiPanelGestureEvent.Position for instant kinds.
public GuiPanelPoint StartPosition { get; }
Value: GuiPanelPoint
Timestamp
When the recogniser emitted it, as UTC wall-clock time on its host; comparable only within one source peer.
public TimePoint Timestamp { get; }
Value: TimePoint
Handedness
The hand that made the contact; Handedness.Unspecified when the recogniser did not tell.
public Handedness Handedness { get; }
Value: Handedness
TapCount
Taps in this run for GuiPanelGestureKind.Tap; 0 for every other kind.
public byte TapCount { get; }
Value: byte