Skip to main content

asdf_overlay_common/
event.rs

1//! The [`OverlayEvent`] enum and assorted types.
2//!
3//! These events are emitted from overlay system and usually sent from server to client via IPC connection.
4//! For the actual usage inside the library, see the documentation of
5//! * Overlay system: `asdf-overlay`
6//! * IPC client: `asdf-overlay-client`
7//! * IPC server: `asdf-overlay-dll`
8
9pub mod tracing;
10
11use asdf_overlay_window_event::WindowEvent;
12use serde::{Deserialize, Serialize};
13
14use surface::SurfaceEvent;
15
16pub use asdf_overlay_event as surface;
17pub use asdf_overlay_window_event as window;
18
19use crate::event::tracing::TracingEvent;
20
21/// Describe a overlay event.
22#[derive(Debug, Clone, Serialize, Deserialize)]
23pub enum OverlayEvent {
24    /// Events related to a specific window.
25    Window { id: u32, event: WindowEvent },
26
27    /// Events related to a specific surface.
28    Surface { id: u64, event: SurfaceEvent },
29
30    /// Input blocking is turned off or interrupted by the user or system.
31    ///
32    /// The user may turn off input blocking at any time,
33    /// for example, by pressing Alt+F4 on Windows.
34    InputBlockingEnded,
35
36    /// A tracing from overlay system.
37    Tracing(TracingEvent),
38}