#[macro_export]
macro_rules! for_each_builtin_structs {
($macro:ident) => {
$macro![
#[derive(Copy, Eq)]
struct KeyboardModifiers {
@name = "slint::private_api::KeyboardModifiers"
export {
alt: bool,
control: bool,
shift: bool,
meta: bool,
}
private {
}
}
struct PointerEvent {
@name = "slint::private_api::PointerEvent"
export {
button: PointerEventButton,
kind: PointerEventKind,
modifiers: KeyboardModifiers,
}
private {
}
}
struct PointerScrollEvent {
@name = "slint::private_api::PointerScrollEvent"
export {
delta_x: Coord,
delta_y: Coord,
modifiers: KeyboardModifiers,
}
private {
}
}
struct KeyEvent {
@name = "slint::private_api::KeyEvent"
export {
text: SharedString,
modifiers: KeyboardModifiers,
repeat: bool,
}
private {
event_type: KeyEventType,
replacement_range: Option<core::ops::Range<i32>>,
preedit_text: SharedString,
preedit_selection: Option<core::ops::Range<i32>>,
cursor_position: Option<i32>,
anchor_position: Option<i32>,
}
}
#[non_exhaustive]
struct StandardListViewItem {
@name = "slint::StandardListViewItem"
export {
text: SharedString,
}
private {
}
}
#[non_exhaustive]
struct TableColumn {
@name = "slint::private_api::TableColumn"
export {
title: SharedString,
min_width: Coord,
horizontal_stretch: f32,
sort_order: SortOrder,
width: Coord,
}
private {
}
}
struct StateInfo {
@name = "slint::private_api::StateInfo"
export {
current_state: i32,
previous_state: i32,
}
private {
change_time: crate::animations::Instant,
}
}
];
};
}