Skip to content

TSdlTouchFingerEvent

Touch finger event structure (Event.Finger.* )

Coordinates in this event are normalized. X and Y are normalized to a range between 0.0 and 1.0, relative to the window, so (0,0) is the top left and (1,1) is the bottom right. Delta coordinates DX and DY are normalized in the ranges of -1.0 (traversed all the way from the bottom or right to all the way up or left) to 1.0 (traversed all the way from the top or left to all the way down or right).

Note that while the coordinates are normalized, they are not clamped, which means in some circumstances you can get a value outside of this range. For example, a renderer using logical presentation might give a negative value when the touch is in the letterboxing. Some platforms might report a touch outside of the window, which will also be outside of the range.

Definition

Unit: Neslib.Sdl3.Events

type TSdlTouchFingerEvent = record ... end;

Properties

Name Description
Delta Normalized in the range (-1...1, -1...1)
DX Normalized in the range -1...1
DY Normalized in the range -1...1
FingerID
Kind Event kind (TSdlEventKind.Finger*)
Position Normalized in the range (0...1, 0...1)
Pressure Normalized in the range 0...1
Timestamp In nanoseconds, populated using SdlGetTicksNS
Touch The touch device
Window The window underneath the finger, if any
WindowID The ID of the window underneath the finger, if any
X Normalized in the range 0...1
Y Normalized in the range 0...1

Property Descriptions

Delta

Normalized in the range (-1...1, -1...1)

property Delta: TSdlPointF read GetDelta

Type: TSdlPointF


DX

Normalized in the range -1...1

property DX: Single read FHandle.dx

Type: Single


DY

Normalized in the range -1...1

property DY: Single read FHandle.dy

Type: Single


FingerID

property FingerID: TSdlFingerID read FHandle.fingerID

Type: TSdlFingerID


Kind

Event kind (TSdlEventKind.Finger*)

property Kind: TSdlEventKind read GetKind

Type: TSdlEventKind


Position

Normalized in the range (0...1, 0...1)

property Position: TSdlPointF read GetPosition

Type: TSdlPointF


Pressure

Normalized in the range 0...1

property Pressure: Single read FHandle.pressure

Type: Single


Timestamp

In nanoseconds, populated using SdlGetTicksNS

property Timestamp: UInt64 read FHandle.timestamp

Type: UInt64


Touch

The touch device

property Touch: TSdlTouch read GetTouch

Type: TSdlTouch


Window

The window underneath the finger, if any

property Window: TSdlWindow read GetWindow

Type: TSdlWindow


WindowID

The ID of the window underneath the finger, if any

property WindowID: TSdlWindowID read FHandle.windowID

Type: TSdlWindowID


X

Normalized in the range 0...1

property X: Single read FHandle.x

Type: Single


Y

Normalized in the range 0...1

property Y: Single read FHandle.y

Type: Single