feat(core): expose run_return on Linux (#3352)

This commit is contained in:
Lucas Fernandes Nogueira 2022-02-07 11:30:45 -03:00 committed by GitHub
parent 55aa22de80
commit 8483fde975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 4 deletions

View File

@ -0,0 +1,7 @@
---
"tauri": patch
"tauri-runtime": patch
"tauri-runtime-wry": patch
---
The `run_return` API is now available on Linux.

View File

@ -1819,7 +1819,6 @@ impl Runtime for Wry {
});
}
#[cfg(any(target_os = "windows", target_os = "macos"))]
fn run_iteration<F: FnMut(RunEvent) + 'static>(&mut self, mut callback: F) -> RunIteration {
use wry::application::platform::run_return::EventLoopExtRunReturn;
let windows = self.windows.clone();

View File

@ -341,7 +341,6 @@ pub trait Runtime: Sized + 'static {
fn set_activation_policy(&mut self, activation_policy: ActivationPolicy);
/// Runs the one step of the webview runtime event loop and returns control flow to the caller.
#[cfg(any(target_os = "windows", target_os = "macos"))]
fn run_iteration<F: Fn(RunEvent) + 'static>(&mut self, callback: F) -> RunIteration;
/// Run the webview runtime.

View File

@ -516,7 +516,6 @@ impl<R: Runtime> App<R> {
/// }
/// }
/// ```
#[cfg(any(target_os = "windows", target_os = "macos"))]
pub fn run_iteration(&mut self) -> crate::runtime::RunIteration {
let manager = self.manager.clone();
let app_handle = self.handle();

View File

@ -561,7 +561,6 @@ impl Runtime for MockRuntime {
#[cfg_attr(doc_cfg, doc(cfg(target_os = "macos")))]
fn set_activation_policy(&mut self, activation_policy: tauri_runtime::ActivationPolicy) {}
#[cfg(any(target_os = "windows", target_os = "macos"))]
fn run_iteration<F: Fn(RunEvent) + 'static>(
&mut self,
callback: F,