@@ -15,15 +15,14 @@ use crate::{
1515 plugin:: { Plugin , PluginStore } ,
1616 runtime:: {
1717 http:: { Request as HttpRequest , Response as HttpResponse } ,
18- webview:: { WebviewAttributes , WindowBuilder as _ } ,
18+ webview:: WebviewAttributes ,
1919 window:: { PendingWindow , WindowEvent as RuntimeWindowEvent } ,
20- Dispatch , ExitRequestedEventAction , RunEvent as RuntimeRunEvent ,
20+ ExitRequestedEventAction , RunEvent as RuntimeRunEvent ,
2121 } ,
2222 scope:: FsScope ,
2323 sealed:: { ManagerBase , RuntimeOrDispatch } ,
24- utils:: config:: { Config , WindowUrl } ,
24+ utils:: config:: Config ,
2525 utils:: { assets:: Assets , Env } ,
26- window:: WindowBuilder ,
2726 Context , EventLoopMessage , Invoke , InvokeError , InvokeResponse , Manager , Runtime , Scopes ,
2827 StateManager , Window ,
2928} ;
@@ -481,38 +480,6 @@ macro_rules! shared_app_impl {
481480 updater:: builder( self . app_handle( ) )
482481 }
483482
484- /// Creates a new webview window.
485- ///
486- /// Data URLs are only supported with the `window-data-url` feature flag.
487- ///
488- /// See [`crate::window::WindowBuilder::new`] for an API with extended functionality.
489- #[ deprecated(
490- since = "1.0.0-rc.4" ,
491- note = "The `window_builder` function offers an easier API with extended functionality"
492- ) ]
493- pub fn create_window<F >(
494- & self ,
495- label: impl Into <String >,
496- url: WindowUrl ,
497- setup: F ,
498- ) -> crate :: Result <Window <R >>
499- where
500- F : FnOnce (
501- <R :: Dispatcher as Dispatch <EventLoopMessage >>:: WindowBuilder ,
502- WebviewAttributes ,
503- ) -> (
504- <R :: Dispatcher as Dispatch <EventLoopMessage >>:: WindowBuilder ,
505- WebviewAttributes ,
506- ) ,
507- {
508- let mut builder = WindowBuilder :: <R >:: new( self , label, url) ;
509- let ( window_builder, webview_attributes) =
510- setup( builder. window_builder, builder. webview_attributes) ;
511- builder. window_builder = window_builder;
512- builder. webview_attributes = webview_attributes;
513- builder. build( )
514- }
515-
516483 #[ cfg( feature = "system-tray" ) ]
517484 #[ cfg_attr( doc_cfg, doc( cfg( feature = "system-tray" ) ) ) ]
518485 /// Gets a handle handle to the system tray.
@@ -979,48 +946,6 @@ impl<R: Runtime> Builder<R> {
979946 self
980947 }
981948
982- /// Creates a new webview window.
983- ///
984- /// # Examples
985- /// ```rust,no_run
986- /// use tauri::WindowBuilder;
987- /// tauri::Builder::default()
988- /// .create_window("main", tauri::WindowUrl::default(), |win, webview| {
989- /// let win = win
990- /// .title("My Main Window")
991- /// .resizable(true)
992- /// .inner_size(800.0, 550.0)
993- /// .min_inner_size(400.0, 200.0);
994- /// return (win, webview);
995- /// });
996- /// ```
997- pub fn create_window < F > (
998- mut self ,
999- label : impl Into < String > ,
1000- url : WindowUrl ,
1001- setup : F ,
1002- ) -> crate :: Result < Self >
1003- where
1004- F : FnOnce (
1005- <R :: Dispatcher as Dispatch < EventLoopMessage > >:: WindowBuilder ,
1006- WebviewAttributes ,
1007- ) -> (
1008- <R :: Dispatcher as Dispatch < EventLoopMessage > >:: WindowBuilder ,
1009- WebviewAttributes ,
1010- ) ,
1011- {
1012- let ( window_builder, webview_attributes) = setup (
1013- <R :: Dispatcher as Dispatch < EventLoopMessage > >:: WindowBuilder :: new ( ) ,
1014- WebviewAttributes :: new ( url) ,
1015- ) ;
1016- self . pending_windows . push ( PendingWindow :: new (
1017- window_builder,
1018- webview_attributes,
1019- label,
1020- ) ?) ;
1021- Ok ( self )
1022- }
1023-
1024949 /// Adds the icon configured on `tauri.conf.json` to the system tray with the specified menu items.
1025950 #[ cfg( feature = "system-tray" ) ]
1026951 #[ cfg_attr( doc_cfg, doc( cfg( feature = "system-tray" ) ) ) ]
0 commit comments