1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
use std::path::PathBuf;
use super::{WindowDescriptor, WindowId};
use bevy_math::{IVec2, Vec2};
#[derive(Debug, Clone)]
pub struct WindowResized {
pub id: WindowId,
pub width: f32,
pub height: f32,
}
#[derive(Debug, Clone)]
pub struct CreateWindow {
pub id: WindowId,
pub descriptor: WindowDescriptor,
}
#[derive(Debug, Clone)]
pub struct CloseWindow {
pub id: WindowId,
}
#[derive(Debug, Clone)]
pub struct WindowCreated {
pub id: WindowId,
}
#[derive(Debug, Clone)]
pub struct WindowCloseRequested {
pub id: WindowId,
}
#[derive(Debug, Clone)]
pub struct CursorMoved {
pub id: WindowId,
pub position: Vec2,
}
#[derive(Debug, Clone)]
pub struct CursorEntered {
pub id: WindowId,
}
#[derive(Debug, Clone)]
pub struct CursorLeft {
pub id: WindowId,
}
#[derive(Debug, Clone)]
pub struct ReceivedCharacter {
pub id: WindowId,
pub char: char,
}
#[derive(Debug, Clone)]
pub struct WindowFocused {
pub id: WindowId,
pub focused: bool,
}
#[derive(Debug, Clone)]
pub struct WindowScaleFactorChanged {
pub id: WindowId,
pub scale_factor: f64,
}
#[derive(Debug, Clone)]
pub struct WindowBackendScaleFactorChanged {
pub id: WindowId,
pub scale_factor: f64,
}
#[derive(Debug, Clone)]
pub enum FileDragAndDrop {
DroppedFile { id: WindowId, path_buf: PathBuf },
HoveredFile { id: WindowId, path_buf: PathBuf },
HoveredFileCancelled { id: WindowId },
}
#[derive(Debug, Clone)]
pub struct WindowMoved {
pub id: WindowId,
pub position: IVec2,
}