diff --git a/.changes/export-window-props-from-wry-runtime.md b/.changes/export-window-props-from-wry-runtime.md new file mode 100644 index 000000000..fbf6e676a --- /dev/null +++ b/.changes/export-window-props-from-wry-runtime.md @@ -0,0 +1,5 @@ +--- +'tauri-runtime-wry': 'patch:changes' +--- + +Makes some methods on `WindowIdStore`, `WindowsStore` and `WindowWrapper` public diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs index 13d9bc7ab..af7ddf5e7 100644 --- a/crates/tauri-runtime-wry/src/lib.rs +++ b/crates/tauri-runtime-wry/src/lib.rs @@ -173,7 +173,7 @@ impl WindowIdStore { self.0.lock().unwrap().insert(w, id); } - fn get(&self, w: &TaoWindowId) -> Option { + pub fn get(&self, w: &TaoWindowId) -> Option { self.0.lock().unwrap().get(w).copied() } } @@ -412,7 +412,7 @@ pub enum ActiveTracingSpan { } #[derive(Debug)] -pub struct WindowsStore(RefCell>); +pub struct WindowsStore(pub RefCell>); // SAFETY: we ensure this type is only used on the main thread. #[allow(clippy::non_send_fields_in_send_ty)] @@ -2388,6 +2388,12 @@ pub struct WindowWrapper { focused_webview: Arc>>, } +impl WindowWrapper { + pub fn label(&self) -> &str { + &self.label + } +} + impl fmt::Debug for WindowWrapper { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("WindowWrapper")