Built-in Structs
DropEvent
Section titled “DropEvent”DropEvent
This structure is passed to the callbacks of the DropArea element
data(data-transfer): The payload set on the sourceDragArea.position(LogicalPosition): The cursor position in theDropArea’s local coordinates.proposed_action(DragAction): The action negotiated from current modifier state, clamped to the allowed set; when no modifier is pressed, the first allowed of move, copy, link. Updated on everyDragMove. The target’scan-dropcallback can return this to honor the user’s modifier choice, or override with any other allowed action.
Edges
A structure representing the four edges of an axis-aligned rectangle
left(length): The left edge valuetop(length): The top edge valueright(length): The right edge valuebottom(length): The bottom edge value
FontMetrics
Section titled “FontMetrics”FontMetrics
A structure to hold metrics of a font for a specified pixel size.
ascent(length): The distance between the baseline and the top of the tallest glyph in the font.descent(length): The distance between the baseline and the bottom of the tallest glyph in the font. This is usually negative.x_height(length): The distance between the baseline and the horizontal midpoint of the tallest glyph in the font, or zero if not specified by the font.cap_height(length): The distance between the baseline and the top of a regular upper-case glyph in the font, or zero if not specified by the font.
InputMethodHints
Section titled “InputMethodHints”InputMethodHints
This structure holds the hints that a TextInput gives to the platform’s input method
(e.g. a soft keyboard) about the expected input.
The input method may take these hints into account, but might also ignore them.
capitalization(CapitalizationMode): The auto-capitalization behavior that the input method should apply. Defaults to sentences.auto_correct(bool): Hint that the input method may automatically correct spelling mistakes as the user types. Defaults to true.auto_complete(bool): Hint that the input method may offer auto-completion suggestions for the entered text. Defaults to true.
KeyEvent
Section titled “KeyEvent”KeyEvent
This structure is generated and passed to the key press and release callbacks of the FocusScope element.
text(string): The unicode representation of the key pressed.modifiers(KeyboardModifiers): The keyboard modifiers active at the time of the key press event.repeat(bool): This field is set to true for key press events that are repeated, i.e. the key is held down. It’s always false for key release events.
KeyboardModifiers
Section titled “KeyboardModifiers”KeyboardModifiers
The KeyboardModifiers struct provides booleans to indicate possible modifier keys on a keyboard, such as Shift, Control, etc.
It is provided as part of KeyEvent’s modifiers field.
Keyboard shortcuts on Apple platforms typically use the Command key (⌘), such as Command+C for “Copy”. On other platforms the same shortcut is typically represented using Control+C. To make it easier to develop cross-platform applications, on macOS, Slint maps the Command key to the control modifier, and the Control key to the meta modifier.
On Windows, the Windows key is mapped to the meta modifier.
alt(bool): Indicates the Alt key on a keyboard.control(bool): Indicates the Control key on a keyboard, except on macOS, where it is the Command key (⌘).shift(bool): Indicates the Shift key on a keyboard.meta(bool): Indicates the Control key on macos, and the Windows key on Windows.
Point
This structure represents a point with x and y coordinate
x(length):y(length):
PointerEvent
Section titled “PointerEvent”PointerEvent
Represents a Pointer event sent by the windowing system.
This structure is passed to the pointer-event callback of the TouchArea element.
button(PointerEventButton): The button that was pressed or releasedkind(PointerEventKind): The kind of the eventmodifiers(KeyboardModifiers): The keyboard modifiers pressed during the eventtouch_finger_id(int): The unique ID of the touch point, indicating the finger ID. 0 means it’s not a touch event (e.g., mouse).
PointerScrollEvent
Section titled “PointerScrollEvent”PointerScrollEvent
Represents a Pointer scroll (or wheel) event sent by the windowing system.
This structure is passed to the scroll-event callback of the TouchArea element.
delta_x(length): The amount of pixel in the horizontal directiondelta_y(length): The amount of pixel in the vertical directionmodifiers(KeyboardModifiers): The keyboard modifiers pressed during the event
Size
This structure represents a size with width and height
width(length):height(length):
StandardListViewItem
Section titled “StandardListViewItem”StandardListViewItem
Represents an item in a StandardListView and a StandardTableView.
text(string): The text content of the item
TableColumn
Section titled “TableColumn”TableColumn
This is used to define the column and the column header of a TableView
title(string): The title of the column headermin_width(length): The minimum column width (logical length)horizontal_stretch(float): The horizontal column stretchsort_order(SortOrder): Sorts the columnwidth(length): the actual width of the column (logical length)
© 2026 SixtyFPS GmbH