use crate::key::{Key, MouseButton, PointerKind};
use crate::protocol::KeyModifiers;
#[derive(Debug, Clone)]
pub struct PointerPress {
pub x: f32,
pub y: f32,
pub button: MouseButton,
pub pointer: PointerKind,
pub finger: Option<u64>,
pub modifiers: KeyModifiers,
pub captured: bool,
}
#[derive(Debug, Clone)]
pub struct PointerRelease {
pub x: f32,
pub y: f32,
pub button: MouseButton,
pub pointer: PointerKind,
pub finger: Option<u64>,
pub modifiers: KeyModifiers,
pub captured: bool,
pub lost: Option<bool>,
}
#[derive(Debug, Clone)]
pub struct PointerMove {
pub x: f32,
pub y: f32,
pub pointer: PointerKind,
pub finger: Option<u64>,
pub modifiers: KeyModifiers,
pub captured: bool,
}
#[derive(Debug, Clone)]
pub struct PointerScroll {
pub x: f32,
pub y: f32,
pub delta_x: f32,
pub delta_y: f32,
pub pointer: PointerKind,
pub modifiers: KeyModifiers,
pub captured: bool,
}
#[derive(Debug, Clone, Default)]
pub struct PointerBoundary {
pub x: Option<f32>,
pub y: Option<f32>,
pub captured: bool,
}
#[derive(Debug, Clone)]
pub struct PointerDrag {
pub x: f32,
pub y: f32,
pub pointer: PointerKind,
pub modifiers: KeyModifiers,
pub captured: bool,
}
#[derive(Debug, Clone)]
pub struct ScrollPosition {
pub absolute_x: f32,
pub absolute_y: f32,
pub relative_x: f32,
pub relative_y: f32,
pub bounds_width: f32,
pub bounds_height: f32,
pub content_width: f32,
pub content_height: f32,
}
#[derive(Debug, Clone)]
pub struct KeyData {
pub key: Key,
pub modified_key: Option<Key>,
pub physical_key: Option<Key>,
pub modifiers: KeyModifiers,
pub text: Option<String>,
pub repeat: bool,
}
#[derive(Debug, Clone, Copy)]
pub struct ResizeDimensions {
pub width: f32,
pub height: f32,
}