makepad_platform/event/
window.rs1use {
2 std::rc::Rc,
3 std::cell::Cell,
4 crate::{
5 makepad_math::*,
6 window::WindowId,
7 }
8 };
10
11#[derive(Clone, Debug, Default, PartialEq)]
12pub struct WindowGeom {
13 pub dpi_factor: f64,
14 pub can_fullscreen: bool,
15 pub xr_is_presenting: bool,
16 pub is_fullscreen: bool,
17 pub is_topmost: bool,
18 pub position: DVec2,
19 pub inner_size: DVec2,
20 pub outer_size: DVec2,
21}
22
23
24#[derive(Clone, Debug)]
25pub struct WindowGeomChangeEvent {
26 pub window_id: WindowId,
27 pub old_geom: WindowGeom,
28 pub new_geom: WindowGeom,
29}
30
31#[derive(Clone, Debug)]
32pub struct WindowMovedEvent {
33 pub window_id: WindowId,
34 pub old_pos: DVec2,
35 pub new_pos: DVec2,
36}
37
38#[derive(Clone, Debug)]
39pub struct WindowCloseRequestedEvent {
40 pub window_id: WindowId,
41 pub accept_close: Rc<Cell<bool>>
42}
43
44#[derive(Clone, Debug)]
45pub struct WindowClosedEvent {
46 pub window_id: WindowId
47}
48#[derive(Clone, Debug, Copy)]
56pub enum WindowDragQueryResponse {
57 NoAnswer,
58 Client,
59 Caption,
60 SysMenu, }
62
63#[derive(Clone, Debug)]
64pub struct WindowDragQueryEvent {
65 pub window_id: WindowId,
66 pub abs: DVec2,
67 pub response: Rc<Cell<WindowDragQueryResponse>>,
68}