fret_runtime/
runner_platform_window_receiver_diagnostics.rs1use fret_core::AppWindowId;
2
3#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4pub enum RunnerPlatformWindowReceiverAtCursorSourceV1 {
5 Unsupported,
6 Win32WindowFromPoint,
7 MacosOrderedWindowsBestEffort,
8}
9
10#[derive(Debug, Clone, Copy, PartialEq, Eq)]
11pub struct RunnerPlatformWindowReceiverAtCursorSnapshotV1 {
12 pub receiver_window: Option<AppWindowId>,
13 pub source: RunnerPlatformWindowReceiverAtCursorSourceV1,
14}
15
16#[derive(Debug, Default)]
17pub struct RunnerPlatformWindowReceiverDiagnosticsStore {
18 latest_at_cursor: Option<RunnerPlatformWindowReceiverAtCursorSnapshotV1>,
19}
20
21impl RunnerPlatformWindowReceiverDiagnosticsStore {
22 pub fn latest_at_cursor(&self) -> Option<RunnerPlatformWindowReceiverAtCursorSnapshotV1> {
23 self.latest_at_cursor
24 }
25
26 pub fn set_latest_at_cursor(
27 &mut self,
28 snapshot: RunnerPlatformWindowReceiverAtCursorSnapshotV1,
29 ) {
30 self.latest_at_cursor = Some(snapshot);
31 }
32}