Refactor IPC a bit

This commit is contained in:
Jonathan Kelley committed 2024-01-04 20:27:04 -08:00
1 parent 4adc912189
commit b5a125b963
7 files changed
+74 -77

No files matched your search

+18
View File
@@ -1,4 +1,22 @@
use serde::{Deserialize, Serialize};
use tao::window::WindowId;
#[derive(Debug, Clone)]
pub struct UserWindowEvent(pub EventData, pub WindowId);
#[derive(Debug, Clone)]
pub enum EventData {
Poll,
Ipc(IpcMessage),
#[cfg(all(feature = "hot-reload", debug_assertions))]
HotReloadEvent(dioxus_hot_reload::HotReloadMsg),
NewWindow,
CloseWindow,
}
/// A message struct that manages the communication between the webview and the eventloop code
///