use std::path::PathBuf;
use freya_elements::events::keyboard::{
Code,
Key,
Modifiers,
};
use torin::prelude::*;
use winit::event::{
Force,
MouseButton,
TouchPhase,
};
use crate::prelude::EventName;
#[derive(Clone, Debug)]
pub struct PlatformEvent {
pub name: EventName,
pub data: PlatformEventData,
}
#[derive(Clone, Debug)]
pub enum PlatformEventData {
Mouse {
cursor: CursorPoint,
button: Option<MouseButton>,
},
Wheel {
scroll: CursorPoint,
cursor: CursorPoint,
},
Keyboard {
key: Key,
code: Code,
modifiers: Modifiers,
},
Touch {
location: CursorPoint,
finger_id: u64,
phase: TouchPhase,
force: Option<Force>,
},
File {
cursor: CursorPoint,
file_path: Option<PathBuf>,
},
}