Skip to content

TSdlDropEvent

An event used to drop text or request a file open by the system (Event.Drop.* )

Definition

Unit: Neslib.Sdl3.Events

type TSdlDropEvent = record ... end;

Properties

Name Description
Data The text for TSdlEventKind.DropText and the file name for TSdlEventKind.DropFile, nil for other events
DataPtr Pointer to the text for TSdlEventKind.DropText and the file name for TSdlEventKind.DropFile, nil for other events
Kind Event kind (TSdlEventKind.Drop*)
Position Position, relative to window (not on begin)
Source The source app that sent this drop event, or empty if that isn't available
SourcePtr Pointer to a string of the source app that sent this drop event, or nil if that isn't available
Timestamp In nanoseconds, populated using SdlGetTicksNS
Window The window that was dropped on, if any
WindowID The ID of the window that was dropped on, if any
X X coordinate, relative to window (not on begin)
Y Y coordinate, relative to window (not on begin)

Property Descriptions

Data

The text for TSdlEventKind.DropText and the file name for TSdlEventKind.DropFile, nil for other events

property Data: String read GetData

Type: String


DataPtr

Pointer to the text for TSdlEventKind.DropText and the file name for TSdlEventKind.DropFile, nil for other events

property DataPtr: PUTF8Char read FHandle.data

Type: PUTF8Char


Kind

Event kind (TSdlEventKind.Drop*)

property Kind: TSdlEventKind read GetKind

Type: TSdlEventKind


Position

Position, relative to window (not on begin)

property Position: TSdlPointF read GetPosition

Type: TSdlPointF


Source

The source app that sent this drop event, or empty if that isn't available

property Source: String read GetSource

Type: String


SourcePtr

Pointer to a string of the source app that sent this drop event, or nil if that isn't available

property SourcePtr: PUTF8Char read FHandle.source

Type: PUTF8Char


Timestamp

In nanoseconds, populated using SdlGetTicksNS

property Timestamp: UInt64 read FHandle.timestamp

Type: UInt64


Window

The window that was dropped on, if any

property Window: TSdlWindow read GetWindow

Type: TSdlWindow


WindowID

The ID of the window that was dropped on, if any

property WindowID: TSdlWindowID read FHandle.windowID

Type: TSdlWindowID


X

X coordinate, relative to window (not on begin)

property X: Single read FHandle.x

Type: Single


Y

Y coordinate, relative to window (not on begin)

property Y: Single read FHandle.y

Type: Single