zenthra-platform 0.2.2

Windowing and platform abstraction layer for the Zenthra UI framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use winit::event::{MouseButton, ElementState, TouchPhase};
use winit::keyboard::KeyCode;

#[derive(Debug, Clone)]
pub enum PlatformEvent {
    MouseMoved { x: f64, y: f64 },
    MouseButton { button: MouseButton, state: ElementState },
    MouseWheel { delta_x: f32, delta_y: f32 },
    KeyDown { key: KeyCode },
    KeyUp { key: KeyCode },
    CharTyped(char),
    Touch { id: u64, phase: TouchPhase, x: f64, y: f64 },
}