use super::*;
#[derive(Clone, Data, Debug, Default, Eq, PartialEq)]
pub struct NativeTouchPoint {
#[get(type(copy))]
pub identifier: i32,
#[get(type(copy))]
pub client_x: i32,
#[get(type(copy))]
pub client_y: i32,
#[get(type(copy))]
pub screen_x: i32,
#[get(type(copy))]
pub screen_y: i32,
#[get(type(copy))]
pub offset_x: i32,
#[get(type(copy))]
pub offset_y: i32,
#[get(type(copy))]
pub page_x: i32,
#[get(type(copy))]
pub page_y: i32,
}
#[derive(Clone, Data, Debug, Default, PartialEq)]
pub struct NativeTouchPointF64 {
#[get(type(copy))]
pub identifier: i32,
#[get(type(copy))]
pub client_x: f64,
#[get(type(copy))]
pub client_y: f64,
#[get(type(copy))]
pub screen_x: f64,
#[get(type(copy))]
pub screen_y: f64,
#[get(type(copy))]
pub offset_x: f64,
#[get(type(copy))]
pub offset_y: f64,
#[get(type(copy))]
pub page_x: f64,
#[get(type(copy))]
pub page_y: f64,
}
#[derive(Clone, Copy, Data, Debug, Default, PartialEq)]
pub struct EuvPinch {
#[get(type(copy))]
pub distance: f64,
#[get(type(copy))]
pub start_distance: f64,
#[get(type(copy))]
pub center_x: f64,
#[get(type(copy))]
pub center_y: f64,
#[get(type(copy))]
pub delta: f64,
}
#[derive(Clone, Copy, Data, Debug, Default, PartialEq)]
pub struct EuvDrag {
#[get(type(copy))]
pub x: f64,
#[get(type(copy))]
pub y: f64,
#[get(type(copy))]
pub delta_x: f64,
#[get(type(copy))]
pub delta_y: f64,
#[get(type(copy))]
#[get(type(copy))]
pub travel: f64,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct EuvGestureConfig {
#[get(type(copy))]
pub swipe_threshold: f64,
#[get(type(copy))]
pub tap_slop: f64,
#[get(type(copy))]
pub long_press_millis: f64,
#[get(type(copy))]
pub pinch_threshold: f64,
}
#[derive(Clone, Data, New)]
pub struct EuvGestureState {
#[get(type(copy))]
pub last_gesture: Signal<Option<EuvGesture>>,
#[get(type(copy))]
pub drag: Signal<Option<EuvDrag>>,
#[get(type(copy))]
pub pinch: Signal<Option<EuvPinch>>,
pub on_start: Option<Rc<dyn Fn(Event)>>,
pub on_move: Option<Rc<dyn Fn(Event)>>,
pub on_end: Option<Rc<dyn Fn(Event)>>,
pub on_cancel: Option<Rc<dyn Fn(Event)>>,
}
#[derive(Clone, Copy, Data)]
pub struct EuvGestureRecognizer {
#[get(type(copy))]
pub config: EuvGestureConfig,
}
#[derive(Clone, Copy, Data, Debug, Default)]
pub struct GestureProgress {
#[get(type(copy))]
pub start_x: f64,
#[get(type(copy))]
pub start_y: f64,
#[get(type(copy))]
pub last_x: f64,
#[get(type(copy))]
pub last_y: f64,
pub travel: f64,
#[get(type(copy))]
pub pinch_start_distance: f64,
#[get(type(copy))]
pub started_at: f64,
#[get(type(copy))]
pub active: bool,
}
#[derive(Clone, Copy, Data, Debug, Default, PartialEq)]
pub struct GesturePoint {
#[get(type(copy))]
pub client_x: f64,
#[get(type(copy))]
pub client_y: f64,
}