diff --git a/dioxus/Cargo.lock b/dioxus/Cargo.lock index 4664e0d..0d168b2 100644 --- a/dioxus/Cargo.lock +++ b/dioxus/Cargo.lock @@ -1915,7 +1915,7 @@ checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "librusl" -version = "0.4.0" +version = "0.5.0" dependencies = [ "clipboard", "dirs 5.0.1", @@ -3232,9 +3232,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] diff --git a/dioxus/Cargo.toml b/dioxus/Cargo.toml index df2a2d4..4c1d6da 100644 --- a/dioxus/Cargo.toml +++ b/dioxus/Cargo.toml @@ -8,11 +8,11 @@ build = "build.rs" [dependencies] librusl = {path="../librusl"} -dioxus = "0.4.0" -tokio = "1.32.0" #for dioxus -futures-channel = "0.3.28" #for dioxus -dioxus-desktop = "0.4.0" -image = "0.24.7" +dioxus = "0.4" +tokio = "1.32" #for dioxus +futures-channel = "0.3" #for dioxus +dioxus-desktop = "0.4" +image = "0.24" [build-dependencies] diff --git a/dioxus/src/main.rs b/dioxus/src/main.rs index 2996a63..683a3da 100644 --- a/dioxus/src/main.rs +++ b/dioxus/src/main.rs @@ -70,6 +70,7 @@ fn app(cx: Scope<()>) -> Element { name: "".to_string(), is_folder: false, plugin: None, + ranges: vec![], }); }; message.set(format!("Found {} in {:.2}s", found_count, fe.duration.as_secs_f32())); @@ -93,10 +94,12 @@ fn app(cx: Scope<()>) -> Element { name: "".to_string(), is_folder: false, plugin: None, + ranges: vec![], }); } } librusl::manager::SearchResult::SearchErrors(_) => { /*todo show errors*/ } + librusl::manager::SearchResult::SearchCount(_) => {} } } @@ -160,12 +163,14 @@ fn app(cx: Scope<()>) -> Element { } else { message.set("Searching".to_string()); man.with_mut(|x| { - x.search(Search { - name_text: text_name.to_string(), - contents_text: text_contents.to_string(), - dir: text_dir.to_string(), - ..Default::default() - }) + x.search( + &Search { + name_text: text_name.to_string(), + contents_text: text_contents.to_string(), + dir: text_dir.to_string(), + ..Default::default() + }, + ) }); } }, diff --git a/druid/Cargo.lock b/druid/Cargo.lock index 6f82b19..2971fd1 100644 --- a/druid/Cargo.lock +++ b/druid/Cargo.lock @@ -1191,7 +1191,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "librusl" -version = "0.4.0" +version = "0.5.0" dependencies = [ "clipboard", "dirs", @@ -1786,7 +1786,7 @@ dependencies = [ [[package]] name = "rusl" -version = "0.6.0" +version = "0.7.0" dependencies = [ "druid", "librusl", @@ -1973,9 +1973,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] diff --git a/druid/Cargo.toml b/druid/Cargo.toml index dad80bb..8f1a6fd 100644 --- a/druid/Cargo.toml +++ b/druid/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rusl" -version = "0.6.0" +version = "0.7.0" edition = "2021" build = "build.rs" description = "search gui" @@ -9,7 +9,7 @@ description = "search gui" librusl = { path="../librusl"} rfd = "0.11" #for selecting directory for gui druid ={ version = "0.8.3", features = ["im", "raw-win-handle"] } #GUI -regex = "1.9" +regex = "1.9" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["windef"] } #for icon in windows diff --git a/druid/src/main.rs b/druid/src/main.rs index 1b17952..5d363fb 100644 --- a/druid/src/main.rs +++ b/druid/src/main.rs @@ -28,12 +28,10 @@ pub const SEARCH: Selector = Selector::new("search"); pub const STOP: Selector = Selector::new("stop"); pub const RESULTS: Selector = Selector::new("results"); pub const UPDATEMESSAGE: Selector = Selector::new("message"); -pub const UPDATECOUNT: Selector = Selector::new("count"); pub const EXPORT: Selector = Selector::new("export"); pub const EXPORTSINGLE: Selector = Selector::new("exportsingle"); const MAX_NAMES: usize = 1000; -const MAX_CONTENT: usize = 10000; #[derive(Data, Clone, Lens)] struct AppState { text_name: String, @@ -44,10 +42,11 @@ struct AppState { error_message: String, showing_errors: bool, visible: Vector, - errors: Vector, + visible_errors: Vector, find_name: String, searching: bool, data: Vector, + done: bool, start: Instant, show_settings: bool, @@ -74,6 +73,8 @@ struct AppState { last_update: Instant, #[data(ignore)] interim_count: usize, + #[data(ignore)] + searched_count: usize, //results #[data(ignore)] @@ -84,7 +85,11 @@ pub fn main() { let (s, r) = mpsc::channel::(); let man = Manager::new(s); let ops = man.get_options(); - let counter = man.counter.clone(); + + //regex constants + let rename = Regex::new(""); + let recontent = Regex::new(""); + let reline = Regex::new(r"(^|\n)(\d+:)"); let data = AppState { text_name: String::new(), @@ -94,12 +99,15 @@ pub fn main() { error_message: String::new(), showing_errors: false, data: Vector::new(), - errors: Vector::new(), visible: Vector::new(), + visible_errors: Vector::new(), start: Instant::now(), show_settings: false, searching: false, interim_count: 0, + searched_count: 0, + done: true, + find_name: String::from("Find"), count: String::new(), //settings @@ -113,9 +121,9 @@ pub fn main() { content_extended: ops.content.extended, content_nonregex: ops.content.nonregex, //regex - re_name: Regex::new(""), - re_content: Regex::new(""), - re_line: Regex::new(r"(^|\n)(\d+:)"), + re_name: rename, + re_content: recontent, + re_line: reline, //update last_update: Instant::now(), @@ -133,17 +141,8 @@ pub fn main() { break; } let mess = mess.unwrap(); - sink.submit_command(RESULTS, mess, Target::Auto).expect("Sent results to sink"); }); - //update counter - let sink = app.get_external_handle(); - spawn(move || loop { - std::thread::sleep(Duration::from_secs(1)); - let count = counter.load(std::sync::atomic::Ordering::Relaxed); - let str = if count != 0 { format!("searched {}", count) } else { String::new() }; - let _ = sink.submit_command(UPDATECOUNT, str, Target::Auto); - }); app.launch(data).expect("Run druid window"); } @@ -187,11 +186,6 @@ fn ui_builder() -> impl Widget { Button::dynamic(|state: &AppState, _env| state.error_message.clone()) .fix_height(40.) .on_click(|_ctx, data, _env| { - if data.showing_errors { - set_visible(data, VisibleType::Results); - } else { - set_visible(data, VisibleType::Errors); - } data.showing_errors = !data.showing_errors; }), ); @@ -208,6 +202,9 @@ fn ui_builder() -> impl Widget { let list = Scroll::new(List::new(|| RawLabel::new().padding(1.0)).lens(AppState::visible).padding(10.)) .background(Color::rgba8(0, 0, 0, 255)) .expand(); + let error_list = Scroll::new(List::new(|| RawLabel::new().padding(1.0)).lens(AppState::visible_errors).padding(10.)) + .background(Color::rgba8(0, 0, 0, 255)) + .expand(); Flex::column() .with_spacer(5.) @@ -246,7 +243,7 @@ fn ui_builder() -> impl Widget { .with_flex_child(berrors, 0.5) .with_flex_child(lcount, 0.5), ) - .with_flex_child(list, 1.0) + .with_flex_child(Either::new(|st, _env| st.showing_errors, error_list, list), 1.0) } fn settings_panel() -> impl Widget { Either::new( @@ -323,9 +320,12 @@ impl AppDelegate for Delegate { data.find_name = String::from("Stop"); data.visible.clear(); + data.visible_errors.clear(); + data.data.clear(); - data.errors.clear(); + data.done = false; data.interim_count = 0; + data.searched_count = 0; data.re_name = RegexBuilder::new(&data.text_name).case_insensitive(!data.name_case_sensitive).build(); let mut pattern = data.text_contents.to_string(); @@ -351,7 +351,7 @@ impl AppDelegate for Delegate { self.manager.set_options(ops); data.start = Instant::now(); - self.manager.search(Search { + self.manager.search(&Search { name_text: data.text_name.clone(), contents_text: data.text_contents.clone(), dir: data.dir.clone(), @@ -363,10 +363,6 @@ impl AppDelegate for Delegate { data.message = RichText::new(mess.clone().into()); return Handled::Yes; } - if let Some(mess) = cmd.get(UPDATECOUNT) { - data.count = mess.clone(); - return Handled::Yes; - } if cmd.is(EXPORT) { self.manager.export(data.data.iter().map(|x| x.to_string()).collect()); @@ -383,11 +379,10 @@ impl AppDelegate for Delegate { if let Some(results) = cmd.get(RESULTS) { match results { SearchResult::FinalResults(results) => { + data.done = true; data.data = results.data.iter().map(|x| x.path.to_string()).collect(); data.raw_data = Arc::new(Some(results.clone())); - set_visible(data, VisibleType::Results); - let filecount = results.data.iter().filter(|x| !x.is_folder).count(); let foldercount = results.data.len() - filecount; let mut string = String::new(); @@ -420,34 +415,48 @@ impl AppDelegate for Delegate { string += &format!(" in {:.3}s", data.start.elapsed().as_secs_f64()); - if !data.errors.is_empty() { - let mut str = format!("{} error", data.errors.len()); - if data.errors.len() > 1 { - str.push_str("s"); + if results.stopped { + string += " (stopped)"; + } + + if !data.visible_errors.is_empty() { + let mut str = format!("{} error", data.visible_errors.len()); + if data.visible_errors.len() > 1 { + str.push('s'); } data.error_message = str; } data.message = RichText::new(string.into()); + data.find_name = "Find".to_string(); } SearchResult::InterimResult(fi) => { if data.visible.len() < MAX_NAMES { - data.visible.push_back(highlight_result( - fi, - data.re_name.clone(), - data.re_content.clone(), - data.re_line.clone(), - 100, - )); + data.visible.push_back(highlight_result(fi, &data.re_content, &data.re_line, 100)); } data.interim_count += 1; if data.last_update.elapsed() > Duration::from_millis(100) { - data.message = rich(&format!("Found {} Searching...", data.interim_count), Color::YELLOW); + data.message = rich( + &format!("Found {} in {} files and folders. Searching...", data.interim_count, data.searched_count), + Color::YELLOW, + ); data.last_update = Instant::now(); } } - SearchResult::SearchErrors(errs) => data.errors.extend(errs.clone()), + SearchResult::SearchErrors(errs) => data.visible_errors.extend(errs.iter().map(|a| rich(a, Color::WHITE))), + SearchResult::SearchCount(count) => { + if !data.done { + data.searched_count = *count; + if data.last_update.elapsed() > Duration::from_millis(100) { + data.message = rich( + &format!("Found {} in {} files and folders. Searching...", data.interim_count, data.searched_count), + Color::YELLOW, + ); + data.last_update = Instant::now(); + } + } + } } return Handled::Yes; @@ -500,48 +509,10 @@ impl AppDelegate for Delegate { } } -fn set_visible(data: &mut AppState, result_type: VisibleType) { - match result_type { - VisibleType::Results => { - if let Some(results) = &*data.raw_data { - let content_count: usize = results.data.iter().take(MAX_NAMES).map(|x| x.matches.len()).sum(); - let mut max_per = usize::MAX; - - if content_count > 0 { - max_per = (MAX_CONTENT as f32 / content_count as f32 * results.data.iter().take(MAX_NAMES).count() as f32) as usize; - max_per = max_per.max(1); - } - //create visible - //limited to fixed number of lines - //add colour and highlighting - //limit content - data.find_name = String::from("Find"); - data.visible = results - .data - .iter() - .take(MAX_NAMES) - .map(|x| highlight_result(x, data.re_name.clone(), data.re_content.clone(), data.re_line.clone(), max_per)) - .collect(); - if results.data.len() > MAX_NAMES { - data.visible - .push_back(RichText::new(format!("...AND {} others", results.data.len() - 1000).into())); - } - } - } - VisibleType::Errors => data.visible = data.errors.iter().take(MAX_NAMES).map(|x| rich(x, Color::WHITE)).collect(), - } -} - -enum VisibleType { - Results, - Errors, -} - fn highlight_result( x: &FileInfo, - re_name: Result, - re_content: Result, - re_numbers: Result, + re_content: &Result, + re_numbers: &Result, max_content_count: usize, ) -> RichText { let sym = if x.is_folder { "📁" } else { "📝" }; @@ -573,23 +544,19 @@ fn highlight_result( rich_with_path(&full, &x.path, Color::rgb8(58, 150, 221)) }; //highlight matches in name: - if let Ok(re) = &re_name { - if let Some(ranges) = re.captures(&x.name) { - let start = x.path.len() - x.name.len(); - for cap in ranges.iter().flatten() { - let mut range = cap.range(); - range.end += start + symlen + 1; - range.start += start + symlen + 1; - - if range.end <= x.path.len() + symlen + 1 { - if full.is_char_boundary(range.start) && full.is_char_boundary(range.end) { - rich.add_attribute(range.clone(), Attribute::Weight(FontWeight::BOLD)); - rich.add_attribute(range.clone(), Attribute::text_color(Color::rgb8(189, 60, 71))); - } - } else { - eprintln!("{range:?} is out of range of {}", x.path.len()); - } + let start = x.path.len() - x.name.len(); + for cap in x.ranges.iter() { + let mut range = cap.clone(); + range.end += start + symlen + 1; + range.start += start + symlen + 1; + + if range.end <= x.path.len() + symlen + 1 { + if full.is_char_boundary(range.start) && full.is_char_boundary(range.end) { + rich.add_attribute(range.clone(), Attribute::Weight(FontWeight::BOLD)); + rich.add_attribute(range.clone(), Attribute::text_color(Color::rgb8(189, 60, 71))); } + } else { + eprintln!("{range:?} is out of range of {}", x.path.len()); } } //highlight matches in content: diff --git a/egui/Cargo.lock b/egui/Cargo.lock index 3371482..41e868c 100644 --- a/egui/Cargo.lock +++ b/egui/Cargo.lock @@ -20,24 +20,24 @@ checksum = "a13739d7177fbd22bb0ed28badfff9f372f8bef46c863db4e1c6248f6b223b6e" [[package]] name = "accesskit" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eb1adf08c5bcaa8490b9851fd53cca27fa9880076f178ea9d29f05196728a8" +checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2" [[package]] name = "accesskit_consumer" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04bb4d9e4772fe0d47df57d0d5dbe5d85dd05e2f37ae1ddb6b105e76be58fb00" +checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134d0acf6acb667c89d3332999b1a5df4edbc8d6113910f392ebb73f2b03bb56" +checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" dependencies = [ "accesskit", "accesskit_consumer", @@ -47,38 +47,40 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e084cb5168790c0c112626175412dc5ad127083441a8248ae49ddf6725519e83" +checksum = "6c8c9b4467d77cacfbc93cee9aa8e7822f6d527c774efdca5f8b3a5280c34847" dependencies = [ "accesskit", "accesskit_consumer", "async-channel", + "async-once-cell", "atspi", - "futures-lite", + "futures-lite 1.13.0", + "once_cell", "serde", "zbus", ] [[package]] name = "accesskit_windows" -version = "0.14.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eac0a7f2d7cd7a93b938af401d3d8e8b7094217989a7c25c55a953023436e31" +checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" dependencies = [ "accesskit", "accesskit_consumer", - "arrayvec", "once_cell", "paste", + "static_assertions", "windows", ] [[package]] name = "accesskit_winit" -version = "0.14.4" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825d23acee1bd6d25cbaa3ca6ed6e73faf24122a774ec33d52c5c86c6ab423c0" +checksum = "88e39fcec2e10971e188730b7a76bab60647dacc973d4591855ebebcadfaa738" dependencies = [ "accesskit", "accesskit_macos", @@ -113,13 +115,14 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" dependencies = [ "cfg-if 1.0.0", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -147,7 +150,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" dependencies = [ "android-properties", - "bitflags", + "bitflags 1.3.2", "cc", "jni-sys", "libc", @@ -200,18 +203,18 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -221,11 +224,11 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ - "async-lock", + "async-lock 2.7.0", "async-task", "concurrent-queue", "fastrand", - "futures-lite", + "futures-lite 1.13.0", "slab", ] @@ -235,10 +238,10 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" dependencies = [ - "async-lock", + "async-lock 2.7.0", "autocfg", "blocking", - "futures-lite", + "futures-lite 1.13.0", ] [[package]] @@ -247,27 +250,80 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ - "async-lock", + "async-lock 2.7.0", "autocfg", "cfg-if 1.0.0", "concurrent-queue", - "futures-lite", + "futures-lite 1.13.0", "log", "parking", - "polling", - "rustix", + "polling 2.8.0", + "rustix 0.37.15", "slab", "socket2", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff" +dependencies = [ + "async-lock 3.1.2", + "cfg-if 1.0.0", + "concurrent-queue", + "futures-io", + "futures-lite 2.0.1", + "parking", + "polling 3.3.1", + "rustix 0.38.25", + "slab", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-lock" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ - "event-listener", + "event-listener 2.5.3", +] + +[[package]] +name = "async-lock" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dea8b3453dd7cc96711834b75400d671b73e3656975fa68d9f277163b7f7e316" +dependencies = [ + "event-listener 4.0.0", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-once-cell" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" + +[[package]] +name = "async-process" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +dependencies = [ + "async-io 1.13.0", + "async-lock 2.7.0", + "async-signal", + "blocking", + "cfg-if 1.0.0", + "event-listener 3.1.0", + "futures-lite 1.13.0", + "rustix 0.38.25", + "windows-sys 0.48.0", ] [[package]] @@ -281,6 +337,24 @@ dependencies = [ "syn 2.0.32", ] +[[package]] +name = "async-signal" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +dependencies = [ + "async-io 2.2.1", + "async-lock 2.7.0", + "atomic-waker", + "cfg-if 1.0.0", + "futures-core", + "futures-io", + "rustix 0.38.25", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", +] + [[package]] name = "async-task" version = "4.4.0" @@ -317,36 +391,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] -name = "atomic_refcell" -version = "0.1.8" +name = "atspi" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" +checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] [[package]] -name = "atspi" -version = "0.10.1" +name = "atspi-common" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" +checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" dependencies = [ - "async-recursion", - "async-trait", - "atspi-macros", "enumflags2", - "futures-lite", "serde", - "tracing", + "static_assertions", "zbus", "zbus_names", + "zvariant", ] [[package]] -name = "atspi-macros" -version = "0.2.0" +name = "atspi-connection" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" dependencies = [ - "quote", - "syn 1.0.109", + "atspi-common", + "atspi-proxies", + "futures-lite 1.13.0", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" +dependencies = [ + "atspi-common", + "serde", + "zbus", ] [[package]] @@ -399,6 +488,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" + [[package]] name = "block" version = "0.1.6" @@ -440,11 +535,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" dependencies = [ "async-channel", - "async-lock", + "async-lock 2.7.0", "async-task", "atomic-waker", "fastrand", - "futures-lite", + "futures-lite 1.13.0", "log", ] @@ -617,7 +712,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "cocoa-foundation", "core-foundation", @@ -633,7 +728,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", @@ -689,7 +784,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-graphics-types", "foreign-types", @@ -702,7 +797,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "foreign-types", "libc", @@ -896,18 +991,18 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "ecolor" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e479a7fa3f23d4e794f8b2f8b3568dd4e47886ad1b12c9c095e141cb591eb63" +checksum = "e6d9d80ab06fc3e7ceb0a7c9b0514c9eba266c189e71044e7bac679e1736a7cb" dependencies = [ "bytemuck", ] [[package]] name = "eframe" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4596583a2c680c55b6feaa748f74890c4f9cb9c7cb69d6117110444cb65b2f" +checksum = "e466044128e75141e10f80943c8e9012f37c65fa3fce34f6ac976856fe289e65" dependencies = [ "bytemuck", "cocoa", @@ -921,8 +1016,10 @@ dependencies = [ "js-sys", "log", "objc", + "parking_lot", "percent-encoding", "raw-window-handle", + "static_assertions", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -933,9 +1030,9 @@ dependencies = [ [[package]] name = "egui" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aef8ec3ae1b772f340170c65bf27d5b8c28f543a0116c844d2ac08d01123e7" +checksum = "2e46df77bb493b9ead5733540efdd2a1b0c18a5f75915921fc734495108172a5" dependencies = [ "accesskit", "ahash", @@ -946,32 +1043,32 @@ dependencies = [ [[package]] name = "egui-winit" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a49155fd4a0a4fb21224407a91de0030847972ef90fc64edb63621caea61cb2" +checksum = "065960051f1ff843be036a1743bd9fc8dfd508c0444dce35d620febed91fad2b" dependencies = [ "accesskit_winit", "arboard", "egui", - "instant", "log", "raw-window-handle", "smithay-clipboard", + "web-time", "webbrowser", "winit", ] [[package]] name = "egui_glow" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8c2752cdf1b0ef5fcda59a898cacabad974d4f5880e92a420b2c917022da64" +checksum = "bcacd802e71d0c3b510cf1e1558432e4afc1434f3ccc9a8b23b42c39cd194207" dependencies = [ "bytemuck", "egui", "glow", "log", - "memoffset 0.6.5", + "memoffset 0.7.1", "wasm-bindgen", "web-sys", ] @@ -984,22 +1081,22 @@ checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] name = "emath" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3857d743a6e0741cdd60b622a74c7a36ea75f5f8f11b793b41d905d2c9721a4b" +checksum = "df747beaedee141dc3950edc68a156c0e548c92fe1a92f0a51c1bdca3d6a054d" dependencies = [ "bytemuck", ] [[package]] name = "embed-resource" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0a2c9b742a980060d22545a7a83b573acd6b73045b9de6370c9530ce652f27" +checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" dependencies = [ "cc", "rustc_version", - "toml 0.7.8", + "toml 0.8.2", "vswhom", "winreg", ] @@ -1118,13 +1215,12 @@ dependencies = [ [[package]] name = "epaint" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09333964d4d57f40a85338ba3ca5ed4716070ab184dcfed966b35491c5c64f3b" +checksum = "12f370b53e435fc235243174f3b2bf68a4b0202f3885cece16ad4aecd03222c4" dependencies = [ "ab_glyph", "ahash", - "atomic_refcell", "bytemuck", "ecolor", "emath", @@ -1194,6 +1290,38 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.0", + "pin-project-lite", +] + [[package]] name = "exr" version = "1.6.3" @@ -1309,6 +1437,16 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-sink" version = "0.3.28" @@ -1481,7 +1619,7 @@ version = "0.30.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f89bab9ec7715de13d5d5402238e66f48e3a5ae636ebb45aba4013c962e2ff15" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "cgl", "core-foundation", @@ -1849,9 +1987,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.142" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -1865,7 +2003,7 @@ dependencies = [ [[package]] name = "librusl" -version = "0.4.0" +version = "0.5.0" dependencies = [ "clipboard", "dirs 5.0.1", @@ -1893,6 +2031,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b64f40e5e03e0d54f03845c8197d0291253cdbedfb1cb46b13c2c117554a9f4c" +[[package]] +name = "linux-raw-sys" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" + [[package]] name = "lock_api" version = "0.4.7" @@ -2056,7 +2200,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "jni-sys", "ndk-sys", "num_enum", @@ -2085,7 +2229,7 @@ version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 1.0.0", "libc", @@ -2098,7 +2242,7 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "memoffset 0.6.5", @@ -2110,7 +2254,7 @@ version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "libc", "memoffset 0.7.1", @@ -2260,9 +2404,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.15.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "option-ext" @@ -2388,9 +2532,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2410,7 +2554,7 @@ version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aaeebc51f9e7d2c150d3f3bfeb667f2aa985db5ef1e3d212847bdedb488beeaa" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "fdeflate", "flate2", @@ -2430,7 +2574,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "concurrent-queue", "libc", @@ -2439,6 +2583,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if 1.0.0", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.25", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "pom" version = "1.1.0" @@ -2580,7 +2738,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2589,7 +2747,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2669,7 +2827,7 @@ dependencies = [ [[package]] name = "rusl" -version = "0.1.9" +version = "0.2.0" dependencies = [ "eframe", "embed-resource", @@ -2699,11 +2857,24 @@ version = "0.37.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0661814f891c57c930a610266415528da53c4933e6dea5fb350cbfe048a9ece" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.6", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +dependencies = [ + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] @@ -2815,6 +2986,15 @@ dependencies = [ "digest", ] +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + [[package]] name = "simd-adler32" version = "0.3.5" @@ -2851,7 +3031,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ - "bitflags", + "bitflags 1.3.2", "calloop", "dlib", "lazy_static", @@ -2955,15 +3135,15 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix", + "rustix 0.37.15", "windows-sys 0.45.0", ] [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -3096,18 +3276,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.2" @@ -3136,8 +3304,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -3388,7 +3554,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" dependencies = [ - "bitflags", + "bitflags 1.3.2", "downcast-rs", "libc", "nix 0.24.2", @@ -3427,7 +3593,7 @@ version = "0.29.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "wayland-client", "wayland-commons", "wayland-scanner", @@ -3477,6 +3643,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57099a701fb3a8043f993e8228dc24229c7b942e2b009a1b962e54489ba1d3bf" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webbrowser" version = "0.8.9" @@ -3604,6 +3780,15 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -3634,6 +3819,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -3646,6 +3846,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -3664,6 +3870,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -3682,6 +3894,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -3700,6 +3918,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -3718,6 +3942,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -3730,6 +3960,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -3748,6 +3984,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winit" version = "0.28.3" @@ -3755,7 +3997,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f504e8c117b9015f618774f8d58cd4781f5a479bc41079c064f974cbb253874" dependencies = [ "android-activity", - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "core-foundation", "core-graphics", @@ -3881,22 +4123,24 @@ checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" [[package]] name = "zbus" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29242fa5ec5693629ae74d6eb1f69622a9511f600986d6d9779bccf36ac316e3" +checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" dependencies = [ "async-broadcast", "async-executor", "async-fs", - "async-io", - "async-lock", + "async-io 1.13.0", + "async-lock 2.7.0", + "async-process", "async-recursion", "async-task", "async-trait", + "blocking", "byteorder", "derivative", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", @@ -3920,9 +4164,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537793e26e9af85f774801dc52c6f6292352b2b517c5cf0449ffd3735732a53a" +checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3934,15 +4178,35 @@ dependencies = [ [[package]] name = "zbus_names" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34f314916bd89bdb9934154627fab152f4f28acdda03e7c4c68181b214fe7e3" +checksum = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" dependencies = [ "serde", "static_assertions", "zvariant", ] +[[package]] +name = "zerocopy" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + [[package]] name = "zip" version = "0.2.8" @@ -3966,9 +4230,9 @@ dependencies = [ [[package]] name = "zvariant" -version = "3.12.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe4914a985446d6fd287019b5fceccce38303d71407d9e6e711d44954a05d8" +checksum = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" dependencies = [ "byteorder", "enumflags2", @@ -3980,9 +4244,9 @@ dependencies = [ [[package]] name = "zvariant_derive" -version = "3.12.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34c20260af4b28b3275d6676c7e2a6be0d4332e8e0aba4616d34007fd84e462a" +checksum = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3993,9 +4257,9 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b22993dbc4d128a17a3b6c92f1c63872dd67198537ee728d8b5d7c40640a8b" +checksum = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" dependencies = [ "proc-macro2", "quote", diff --git a/egui/Cargo.toml b/egui/Cargo.toml index d31df60..c8f85cc 100644 --- a/egui/Cargo.toml +++ b/egui/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "rusl" -version = "0.1.9" +version = "0.2.0" edition = "2021" build = "build.rs" [dependencies] librusl={path="../librusl"} -rfd = "0.12.0" #for selecting directory for gui -eframe = "0.22.0" #egui -image = "0.24.7" #for titlebar icon +rfd = "0.12" #for selecting directory for gui +eframe = "0.24" #egui +image = "0.24" #for titlebar icon [build-dependencies] -embed-resource="2.3.0" #for icon +embed-resource="2.4" #for icon diff --git a/egui/src/main.rs b/egui/src/main.rs index db5a5d2..9090cd3 100644 --- a/egui/src/main.rs +++ b/egui/src/main.rs @@ -4,27 +4,28 @@ use std::{ path::PathBuf, + process, sync::{Arc, Mutex}, thread, time::Duration, }; -use eframe::egui::{self, Grid, ScrollArea}; - +use eframe::egui::{self, Grid, ScrollArea, ViewportBuilder}; use librusl::{ + fileinfo::FileInfo, manager::{FinalResults, Manager, SearchResult}, search::Search, }; pub fn main() { let native_options = eframe::NativeOptions { - icon_data: Some(load_icon()), + //icon_data: Some(load_icon()), + viewport: ViewportBuilder::default().with_icon(load_icon()), ..Default::default() }; - eframe::run_native("rusl", native_options, Box::new(|cc| Box::new(AppState::new(cc)))).expect("Could not run"); } -fn load_icon() -> eframe::IconData { +fn load_icon() -> egui::IconData { let (icon_rgba, icon_width, icon_height) = { let image = image::load_from_memory(include_bytes!("icons/icon.png")).unwrap().into_rgba8(); let (width, height) = image.dimensions(); @@ -32,7 +33,7 @@ fn load_icon() -> eframe::IconData { (rgba, width, height) }; - eframe::IconData { + egui::IconData { rgba: icon_rgba, width: icon_width, height: icon_height, @@ -44,6 +45,7 @@ pub struct AppState { search_content: String, show_settings: bool, results: Arc>, + interim: Arc>>, manager: Manager, message: String, last_id: usize, @@ -77,12 +79,15 @@ impl AppState { data: vec![], duration: Duration::from_secs(0), id: 0, + stopped: false, })); + let interim = Arc::new(Mutex::new(vec![])); let results_thread = results.clone(); + let interim_thread = interim.clone(); let (sx, rx) = std::sync::mpsc::channel(); let manager = Manager::new(sx); - spawn_receiver(rx, results_thread, cc.egui_ctx.clone()); + spawn_receiver(rx, results_thread, interim_thread, cc.egui_ctx.clone()); Self { // Example stuff: @@ -91,19 +96,20 @@ impl AppState { show_settings: false, results, + interim, manager, message: "Ready to search".to_string(), last_id: 0, } } - fn menu(&mut self, frame: &mut eframe::Frame, ctx: &egui::Context) { + fn menu(&mut self, _frame: &mut eframe::Frame, ctx: &egui::Context) { egui::TopBottomPanel::top("top_panel").show(ctx, |ui| { egui::menu::bar(ui, |ui| { ui.menu_button("File", |ui| { if ui.button("Quit").clicked() { self.manager.save_and_quit(); - frame.close(); + process::exit(0); } }); }); @@ -168,7 +174,8 @@ impl AppState { } else if !PathBuf::from(&self.manager.get_options().last_dir).exists() { self.message = "Invalid directory".to_string(); } else { - self.manager.search(Search { + self.interim.lock().unwrap().clear(); + self.manager.search(&Search { name_text: self.search_name.clone(), contents_text: self.search_content.clone(), dir: self.manager.get_options().last_dir, @@ -202,36 +209,51 @@ impl AppState { ScrollArea::new([true, true]).min_scrolled_height(200.).show(ui, |ui| { Grid::new("grid").num_columns(2).striped(true).show(ui, |ui| { if let Ok(results) = self.results.try_lock() { - for r in results.data.iter().take(2000) { - ui.label(&r.path); - const MAX_COUNT: usize = 100; - const MAX_LEN: usize = 200; - let mut content = r.content(MAX_COUNT, MAX_LEN); - if r.matches.len() > MAX_COUNT { - content.push_str(&format!("\nand {} other lines", r.matches.len() - MAX_COUNT)); + if !results.data.is_empty() { + self.draw_fileinfos(&results.data, ui); + if results.id != self.last_id { + self.last_id = results.id; + self.message = format!("Found {} results in {:.2}s", results.data.len(), results.duration.as_secs_f64()); } - if !content.is_empty() { - ui.label(&content); + } else { + if let Ok(interim) = self.interim.try_lock() { + self.draw_fileinfos(&interim, ui); } - ui.end_row(); - } - if results.data.len() > 2000 { - ui.label(format!("and {} others...", results.data.len() - 2000)); - } - if results.id != self.last_id { - self.last_id = results.id; - self.message = format!("Found {} results in {:.2}s", results.data.len(), results.duration.as_secs_f64()); } } }); }); } + + fn draw_fileinfos(&self, results: &[FileInfo], ui: &mut egui::Ui) { + for r in results.iter().take(2000) { + ui.label(&r.path); + const MAX_COUNT: usize = 100; + const MAX_LEN: usize = 200; + let mut content = r.content(MAX_COUNT, MAX_LEN); + if r.matches.len() > MAX_COUNT { + content.push_str(&format!("\nand {} other lines", r.matches.len() - MAX_COUNT)); + } + if !content.is_empty() { + ui.label(&content); + } + ui.end_row(); + } + if results.len() > 2000 { + ui.label(format!("and {} others...", results.len() - 2000)); + } + } } -fn spawn_receiver(rx: std::sync::mpsc::Receiver, results_thread: Arc>, context: egui::Context) { +fn spawn_receiver( + rx: std::sync::mpsc::Receiver, + results_thread: Arc>, + interim: Arc>>, + context: egui::Context, +) { thread::spawn(move || loop { - if let Ok(rec) = rx.recv() { - match rec { + match rx.recv() { + Ok(rec) => match rec { SearchResult::FinalResults(res) => { let mut res_self = results_thread.lock().unwrap(); if res.id > res_self.id { @@ -241,14 +263,16 @@ fn spawn_receiver(rx: std::sync::mpsc::Receiver, results_thread: A context.request_repaint(); } } - SearchResult::InterimResult(_) => { - //TODO. currently only final results are loaded. + SearchResult::InterimResult(fi) => { //this is to show interim results as they are received + interim.lock().unwrap().push(fi); } SearchResult::SearchErrors(_) => { /*todo show errors*/ } - }; - } else { - println!("error recv"); + SearchResult::SearchCount(_) => {} + }, + Err(err) => { + eprintln!("Error: {err:?}:{err}") + } } }); } diff --git a/iced/Cargo.lock b/iced/Cargo.lock index 139f2c1..0cd4830 100644 --- a/iced/Cargo.lock +++ b/iced/Cargo.lock @@ -180,6 +180,21 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bit-set" version = "0.5.3" @@ -1305,7 +1320,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e14551578f49da1f774b70da5bd1b8c20bbbead01620c426cb0a217536d95a6a" dependencies = [ - "base64", + "base64 0.20.0", "bstr", "grep-matcher", "grep-searcher", @@ -1432,6 +1447,7 @@ source = "git+https://github.com/iced-rs/iced#817f72868746461891ca4e74473c555f3b dependencies = [ "iced_core", "iced_futures", + "iced_highlighter", "iced_renderer", "iced_widget", "iced_winit", @@ -1485,6 +1501,16 @@ dependencies = [ "xxhash-rust", ] +[[package]] +name = "iced_highlighter" +version = "0.12.0" +source = "git+https://github.com/iced-rs/iced#817f72868746461891ca4e74473c555f3b5c5703" +dependencies = [ + "iced_core", + "once_cell", + "syntect", +] + [[package]] name = "iced_renderer" version = "0.12.0" @@ -1777,7 +1803,7 @@ dependencies = [ [[package]] name = "librusl" -version = "0.4.0" +version = "0.5.0" dependencies = [ "clipboard", "dirs", @@ -1793,6 +1819,15 @@ dependencies = [ "walkdir", ] +[[package]] +name = "line-wrap" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" +dependencies = [ + "safemem", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2243,6 +2278,28 @@ version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +[[package]] +name = "onig" +version = "6.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f" +dependencies = [ + "bitflags 1.3.2", + "libc", + "once_cell", + "onig_sys", +] + +[[package]] +name = "onig_sys" +version = "69.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7" +dependencies = [ + "cc", + "pkg-config", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -2457,6 +2514,20 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "plist" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +dependencies = [ + "base64 0.21.5", + "indexmap", + "line-wrap", + "quick-xml 0.31.0", + "serde", + "time 0.3.30", +] + [[package]] name = "png" version = "0.17.10" @@ -2554,6 +2625,15 @@ dependencies = [ "memchr 2.6.4", ] +[[package]] +name = "quick-xml" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +dependencies = [ + "memchr 2.6.4", +] + [[package]] name = "quote" version = "1.0.33" @@ -2683,6 +2763,12 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" + [[package]] name = "regex-syntax" version = "0.8.2" @@ -2729,10 +2815,11 @@ dependencies = [ [[package]] name = "rusl" -version = "0.2.0" +version = "0.3.0" dependencies = [ "embed-resource", "iced", + "iced_core", "image", "librusl", "rfd", @@ -2782,6 +2869,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +[[package]] +name = "safemem" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" + [[package]] name = "same-file" version = "1.0.6" @@ -3036,6 +3129,27 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syntect" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e02b4b303bf8d08bfeb0445cba5068a3d306b6baece1d5582171a9bf49188f91" +dependencies = [ + "bincode", + "bitflags 1.3.2", + "flate2", + "fnv", + "once_cell", + "onig", + "plist", + "regex-syntax 0.7.5", + "serde", + "serde_json", + "thiserror", + "walkdir", + "yaml-rust", +] + [[package]] name = "sys-locale" version = "0.3.1" @@ -3066,9 +3180,9 @@ checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -4137,6 +4251,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9828b178da53440fa9c766a3d2f73f7cf5d0ac1fe3980c1e5018d899fd19e07b" +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "yazi" version = "0.1.6" diff --git a/iced/Cargo.toml b/iced/Cargo.toml index b15ca9e..3886a57 100644 --- a/iced/Cargo.toml +++ b/iced/Cargo.toml @@ -1,13 +1,14 @@ [package] name = "rusl" -version = "0.2.0" +version = "0.3.0" edition = "2021" build = "build.rs" [dependencies] librusl={path="../librusl"} rfd = "0.12.1" #for selecting directory for gui -iced = { git= "https://github.com/iced-rs/iced", features = ["debug", "tokio"] }#gui +iced = { git= "https://github.com/iced-rs/iced", features = ["debug", "tokio","highlighter"] }#gui +iced_core={git="https://github.com/iced-rs/iced"} image = "0.24.7"#for icon [build-dependencies] diff --git a/iced/src/main.rs b/iced/src/main.rs index c238b76..8daa610 100644 --- a/iced/src/main.rs +++ b/iced/src/main.rs @@ -1,5 +1,5 @@ //hide windows console -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] +//#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] use std::{ sync::mpsc::{channel, Receiver}, @@ -35,6 +35,7 @@ struct App { receiver: Receiver, message: String, found: usize, + searching: bool, } #[derive(Debug, Clone)] @@ -52,6 +53,7 @@ pub enum Message { pub fn main() { let mut sets = Settings::<()> { default_text_size: iced::Pixels::from(18.), + // default_font: Font::MONOSPACE, antialiasing: true, ..Default::default() }; @@ -85,6 +87,7 @@ impl Application for App { manager: man, receiver: r, found: 0, + searching: false, }; (d, widget::focus_next()) } @@ -163,7 +166,11 @@ impl Application for App { Row::new() .spacing(15) .align_items(iced::Alignment::End) - .push(Button::new(Text::new("Find")).on_press(Message::FindPressed)) + .push(if self.searching { + Button::new(Text::new("Stop")).on_press(Message::FindPressed) + } else { + Button::new(Text::new("Find")).on_press(Message::FindPressed) + }) .push(Text::new(&self.message)) .push(clipboard), ) @@ -173,14 +180,22 @@ impl Application for App { fn update(&mut self, message: Self::Message) -> Command { match message { Message::FindPressed => { - self.results.clear(); - self.found = 0; - self.message = "Searching...".to_string(); - self.manager.search(Search { - dir: self.directory.clone(), - name_text: self.name.clone(), - contents_text: self.contents.clone(), - }) + if self.searching { + self.manager.stop(); + self.message = format!("Found {} items. Stopped", self.found); + + self.searching = false; + } else { + self.results.clear(); + self.searching = true; + self.found = 0; + self.message = "Searching...".to_string(); + self.manager.search(&Search { + dir: self.directory.clone(), + name_text: self.name.clone(), + contents_text: self.contents.clone(), + }) + } } Message::NameChanged(nn) => self.name = nn, Message::ContentsChanged(con) => self.contents = con, @@ -196,8 +211,9 @@ impl Application for App { while let Ok(res) = self.receiver.try_recv() { match res { SearchResult::FinalResults(res) => { + self.searching = false; self.message = format!("Found {} items in {:.2}s", res.data.len(), res.duration.as_secs_f64()); - self.results = res.data.iter().take(1000).cloned().collect(); + //self.results = res.data.iter().take(1000).cloned().collect(); if res.data.len() > 1000 { self.results.push(FileInfo { path: format!("...and {} others", res.data.len() - 1000), @@ -206,6 +222,7 @@ impl Application for App { name: "".into(), is_folder: false, plugin: None, + ranges: vec![], }); } } @@ -217,8 +234,12 @@ impl Application for App { self.message = format!("Found {}, searching...", self.found); } SearchResult::SearchErrors(_) => {} + SearchResult::SearchCount(_) => {} } } + if let Err(std::sync::mpsc::TryRecvError::Disconnected) = self.receiver.try_recv() { + return Command::none(); + } } Message::OpenDirectory => { if let Some(path) = rfd::FileDialog::new().pick_folder() { @@ -245,6 +266,7 @@ impl Application for App { self.message = "Copied to clipboard".to_string(); } } + Command::none() } fn theme(&self) -> Theme { diff --git a/justfile b/justfile new file mode 100644 index 0000000..5dce09d --- /dev/null +++ b/justfile @@ -0,0 +1,32 @@ +shebang := if os() == 'windows' { + 'powershell.exe' +} else { + '/usr/bin/bash' +} + +default: druid + +druid: + #!{{shebang}} + cd druid + cargo rr + +dioxus: + #!{{shebang}} + cd dioxus + cargo rr + +iced: + #!{{shebang}} + cd iced + cargo rr + +egui: + #!{{shebang}} + cd egui + cargo rr + +slint: + #!{{shebang}} + cd slint + cargo rr \ No newline at end of file diff --git a/librusl/Cargo.lock b/librusl/Cargo.lock index 54fb6ef..8ba1c29 100644 --- a/librusl/Cargo.lock +++ b/librusl/Cargo.lock @@ -514,7 +514,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "librusl" -version = "0.4.0" +version = "0.5.0" dependencies = [ "clipboard", "dirs", @@ -912,9 +912,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] diff --git a/librusl/Cargo.toml b/librusl/Cargo.toml index ca2c145..107802a 100644 --- a/librusl/Cargo.toml +++ b/librusl/Cargo.toml @@ -1,19 +1,19 @@ [package] name = "librusl" -version = "0.4.0" +version = "0.5.0" edition = "2021" description = "main rusl library" [dependencies] -regex = "1.10.1" # for pattern matching +regex = "1.10" # for pattern matching num_cpus = "1.16.0" # for parallel search -grep = "0.2.12" #ripgrep -ignore = "0.4.20" #parallel walker from ripgrep -walkdir = "2.4.0" #walker from ripgrep -clipboard = "0.5.0" #for clipboard -dirs = "5.0.1" #for getting config file -serde = { version="1.0.188", features=["derive"]} #save config -toml = "0.8.1" #config format -termcolor = "1.3.0" #unly used for grep to get nocolor +grep = "0.2" #ripgrep +ignore = "0.4" #parallel walker from ripgrep +walkdir = "2.4" #walker from ripgrep +clipboard = "0.5" #for clipboard +dirs = "5.0" #for getting config file +serde = { version="1.0", features=["derive"]} #save config +toml = "0.8" #config format +termcolor = "1.4" #unly used for grep to get nocolor pdf-extract= "0.7.2" # for pdf dotext = "0.1.1" # for office docs diff --git a/librusl/src/fileinfo.rs b/librusl/src/fileinfo.rs index c7970ec..c56b656 100644 --- a/librusl/src/fileinfo.rs +++ b/librusl/src/fileinfo.rs @@ -10,6 +10,7 @@ pub struct FileInfo { pub name: String, pub is_folder: bool, pub plugin: Option, + pub ranges: Vec>, //TODO: save ranges for highlighting } impl FileInfo { @@ -34,4 +35,5 @@ impl FileInfo { pub struct Match { pub line: usize, pub content: String, + pub ranges: Vec>, } diff --git a/librusl/src/manager.rs b/librusl/src/manager.rs index 4546530..8d1886e 100644 --- a/librusl/src/manager.rs +++ b/librusl/src/manager.rs @@ -19,10 +19,11 @@ use crate::search::Search; pub enum Message { File(FileInfo, usize), - Done(usize, Duration), + Done(usize, Duration, bool), //id, elapsed, stopped ContentFiles(Vec, usize, Duration), StartSearch(usize), FileErrors(Vec), + SearchCount(usize), //number of files we went through Quit, } @@ -31,21 +32,26 @@ pub enum SearchResult { FinalResults(FinalResults), InterimResult(FileInfo), SearchErrors(Vec), + SearchCount(usize), } #[derive(Debug, Clone)] pub struct FinalResults { pub data: Vec, pub duration: Duration, pub id: usize, + pub stopped: bool, } pub struct Manager { - internal_sender: Sender, - id: usize, + internal_sender: Sender, //send internal messages + current_search_id: Arc, //we keep track of searches, and stop old searches + total_search_count: Arc, //we keep track of total number of files searched + stopped: Arc, //if we stopped the search options: Arc>, - pub must_stop: Arc, - pub counter: Arc, } +// Manager has an internal receiver channel to receive internal messages. +// These get processed and sent to the external sender channel. + impl Manager { pub fn new(external_sender: Sender) -> Self { let ops = load_options(); @@ -59,25 +65,24 @@ impl Manager { }); Self { internal_sender: s, - id: 0, + current_search_id: Arc::new(AtomicUsize::new(0)), options: ops, - must_stop: Arc::new(AtomicBool::new(false)), - counter: Arc::new(AtomicUsize::new(0)), + total_search_count: Arc::new(AtomicUsize::new(0)), + stopped: Arc::new(AtomicBool::new(false)), } } + pub fn stop(&mut self) { - self.must_stop.store(true, std::sync::atomic::Ordering::Relaxed); - } - pub fn get_count(&self) -> usize { - self.counter.load(Ordering::Relaxed) + //incrementing search id will stop any ongoing searches + self.current_search_id.fetch_add(1, Ordering::Relaxed); + self.stopped.store(true, Ordering::Relaxed); } - pub fn search(&mut self, search: Search) { - //start with must stop=TRUE in case old one is running - self.must_stop.store(false, Ordering::Relaxed); + pub fn search(&mut self, search: &Search) { + self.stop(); + self.stopped.store(false, Ordering::Relaxed); + let mut ops = self.options.lock().unwrap(); - self.id += 1; - self.counter.store(0, Ordering::Relaxed); ops.last_dir = search.dir.clone(); if !search.name_text.is_empty() && !ops.name_history.contains(&search.name_text) { ops.name_history.push(search.name_text.clone()); @@ -87,8 +92,7 @@ impl Manager { } drop(ops); - self.must_stop.store(false, Ordering::Relaxed); - self.spawn_search(search); + self.spawn_search(&search); } pub fn save_and_quit(&self) { @@ -125,55 +129,97 @@ impl Manager { } } - fn spawn_search(&self, search: Search) { - let message_number = self.id; - + fn spawn_search(&self, search: &Search) { + let search = search.to_owned(); + self.total_search_count.store(0, Ordering::Relaxed); let file_sender = self.internal_sender.clone(); + let start_search_id = self.current_search_id.load(Ordering::Relaxed); + let stopped = self.stopped.clone(); + //reset search, and send type - let res = file_sender.send(Message::StartSearch(self.id)); + let res = file_sender.send(Message::StartSearch(start_search_id)); if let Result::Err(err) = res { - eprintln!("Error sending {err}"); + eprintln!("Error starting search: {err}"); } - //change must stop to false, and reset counter - self.counter.store(0, Ordering::Relaxed); - self.must_stop.store(false, Ordering::Relaxed); + //send total count regularly + let total_sender = file_sender.clone(); + let total_count = self.total_search_count.clone(); + let current_search_id0 = self.current_search_id.clone(); + + thread::spawn(move || { + let total_count = total_count.clone(); + loop { + let _ = total_sender.send(Message::SearchCount(total_count.load(Ordering::Relaxed))); + thread::sleep(Duration::from_millis(100)); + if current_search_id0.load(Ordering::Relaxed) != start_search_id { + break; + } + } + }); //do name search - let must_stop1 = self.must_stop.clone(); - let counter1 = self.counter.clone(); + let current_search_id1 = self.current_search_id.clone(); let search1 = search.clone(); let file_sender1 = file_sender.clone(); let options1 = self.options.lock().unwrap().clone(); + let total_search_count1 = self.total_search_count.clone(); if !search.name_text.is_empty() { + let counter_search_id = current_search_id1.clone(); thread::spawn(move || { let start = Instant::now(); - Manager::find_names(&search1, options1, message_number, file_sender1.clone(), must_stop1, counter1); - if let Err(err) = file_sender1.send(Message::Done(message_number, start.elapsed())) { - eprintln!("Manager: Could not send result {message_number} {err:?}"); + Manager::find_names( + &search1, + options1, + file_sender1.clone(), + current_search_id1, + start_search_id, + total_search_count1, + ); + let stopped = stopped.load(Ordering::Relaxed); + if let Err(err) = file_sender1.send(Message::Done(start_search_id, start.elapsed(), stopped)) { + eprintln!("Manager: Could not send result {start_search_id} {err:?}:{err}"); } + counter_search_id.fetch_add(1, Ordering::Relaxed); //stop counting }); } - //do content search (only if name is empty, otherwise it will be spawned after) - let must_stop2 = self.must_stop.clone(); - let counter2 = self.counter.clone(); - let options2 = self.options.lock().unwrap().clone(); - if !search.contents_text.is_empty() && search.name_text.is_empty() { + else if !search.contents_text.is_empty() && search.name_text.is_empty() { + let current_search_id2 = self.current_search_id.clone(); + let options2 = self.options.lock().unwrap().clone(); + let total_search_count2 = self.total_search_count.clone(); + thread::spawn(move || { let start = Instant::now(); - let files = Manager::find_contents(&search.contents_text, &search.dir, None, options2, must_stop2, counter2); + let files = Manager::find_contents( + &search.contents_text, + &search.dir, + &HashSet::new(), + options2, + current_search_id2, + start_search_id, + Some(total_search_count2), + ); + let stopped = stopped.load(Ordering::Relaxed); file_sender - .send(Message::ContentFiles(files.results, message_number, start.elapsed())) + .send(Message::ContentFiles(files.results, start_search_id, start.elapsed())) .unwrap(); file_sender.send(Message::FileErrors(files.errors)).unwrap(); - file_sender.send(Message::Done(message_number, start.elapsed())).unwrap(); + file_sender.send(Message::Done(start_search_id, start.elapsed(), stopped)).unwrap(); + eprintln!("Done content search"); }); } } - fn find_names(search: &Search, options: Options, id: usize, file_sender: Sender, must_stop: Arc, counter: Arc) { + fn find_names( + search: &Search, + options: Options, + file_sender: Sender, + global_search_id: Arc, // current global id + start_search_id: usize, //id when starting this search + total_search_count: Arc, + ) { let text = &search.name_text; let dir = &search.dir; let ftype = options.name.file_types; @@ -197,14 +243,21 @@ impl Manager { walker.run(|| { let file_sender = file_sender.clone(); let re = re.clone(); - + let global_search_id = global_search_id.clone(); let options = options.clone(); - let must_stop = must_stop.clone(); - let counter = counter.clone(); + let total_search_count = total_search_count.clone(); Box::new(move |result| { - if must_stop.load(Ordering::Relaxed) { + if global_search_id.load(Ordering::Relaxed) != start_search_id { return ignore::WalkState::Quit; } + //dont include root directory name itself + if let Ok(dent) = &result { + if dent.depth() == 0 { + return ignore::WalkState::Continue; + } + } + + total_search_count.fetch_add(1, Ordering::Relaxed); let dent = match result { Ok(dent) => dent, Err(err) => { @@ -233,7 +286,6 @@ impl Manager { } _ => (), } - let is_match = re.clone().is_match(dent.file_name().to_str().unwrap_or_default()); if is_match { @@ -247,10 +299,11 @@ impl Manager { let cont = Manager::find_contents( &search.contents_text, dir, - Some(HashSet::from_iter([dent.path().to_string_lossy().to_string()])), + &HashSet::from_iter([dent.path().to_string_lossy().to_string()]), options.clone(), - must_stop.clone(), - counter.clone(), + global_search_id.clone(), + start_search_id, + None, ); if cont.results.is_empty() { must_add = false; @@ -263,8 +316,17 @@ impl Manager { } } } - + if global_search_id.load(Ordering::Relaxed) != start_search_id { + eprintln!("New search started, stopping current search"); + return ignore::WalkState::Quit; + } if must_add { + //find all matches on name + let regex_matches = re + .find_iter(dent.file_name().to_str().unwrap_or_default()) + .map(|a| a.range()) + .collect::>(); + let res = file_sender.send(Message::File( FileInfo { path: dent.path().to_string_lossy().to_string(), @@ -278,11 +340,14 @@ impl Manager { matches, is_folder: dent.file_type().unwrap().is_dir(), plugin: None, + ranges: regex_matches, }, - id, + start_search_id, )); - if let Result::Err(err) = res { - eprintln!("Error sending {err}"); + //receiver closed, so we quit + if res.is_err() { + eprintln!("receiver closed, stopping search"); + return ignore::WalkState::Quit; } } } @@ -295,18 +360,22 @@ impl Manager { fn find_contents( text: &str, dir: &str, - allowed_files: Option>, + allowed_files: &HashSet, options: Options, - must_stop: Arc, - counter: Arc, + global_search_id: Arc, + start_search_id: usize, + total_search_count: Option>, //only Some if find contents, else None because we would have counted the file in the name search ) -> ContentFileInfoResults { + let re = regex::RegexBuilder::new(text).case_insensitive(!options.content.case_sensitive).build(); + let content_results = rgtools::search_contents( text, &[OsString::from_str(dir).unwrap()], allowed_files, options.content, - must_stop, - counter, + global_search_id, + start_search_id, + total_search_count, ); let strings = content_results.results; let errors = content_results.errors; @@ -331,10 +400,13 @@ impl Manager { name: PathBuf::from(f[0]).file_name().unwrap_or_default().to_str().unwrap_or_default().into(), is_folder: pb.is_dir(), plugin: extended, + ranges: vec![], }); + let regex_matches = re.clone().unwrap().find_iter(f[2]).map(|a| a.range()).collect::>(); entry.matches.push(Match { line: f[1].parse().unwrap_or(0), content: f[2].to_owned(), + ranges: regex_matches, }); } ContentFileInfoResults { @@ -376,47 +448,48 @@ fn message_receiver(internal_receiver: Receiver, external_sender: Sende final_names.clear(); } Message::ContentFiles(files, number, elapsed) => { - if number != latest_number { - return; - } - //only update if new update (old updates are discarded) - for f in files { - final_names.push(f); + if number == latest_number { + //only update if new update (old updates are discarded) + for f in files { + final_names.push(f); + } + tot_elapsed += elapsed; } - tot_elapsed += elapsed; } Message::File(file, number) => { //only update if new update (old updates are discarded) - if number != latest_number { - return; + if number == latest_number { + //send to output + final_names.push(file.clone()); + //quietly ignore if no receiver because probably closed + let _ = external_sender.send(SearchResult::InterimResult(file)); } - //send to output - final_names.push(file.clone()); - //quietly ignore if no receiver because probably closed - let _ = external_sender.send(SearchResult::InterimResult(file)); } - Message::Done(number, elapsed) => { - if number != latest_number { - return; + Message::Done(number, elapsed, stopped) => { + if number == latest_number { + tot_elapsed += elapsed.to_owned(); + + let sort_type = ops.lock().unwrap().sort; + Manager::do_sort(&mut final_names, sort_type); + let results = SearchResult::FinalResults(FinalResults { + id: latest_number, + data: final_names.to_vec(), + duration: tot_elapsed, + stopped, + }); + + //send out to whoever is listening + let _ = external_sender.send(results); } - tot_elapsed += elapsed.to_owned(); - - let sort_type = ops.lock().unwrap().sort; - Manager::do_sort(&mut final_names, sort_type); - let results = SearchResult::FinalResults(FinalResults { - id: latest_number, - data: final_names.to_vec(), - duration: tot_elapsed, - }); - - //send out to whoever is listening - external_sender.send(results).expect("Sent results"); } Message::Quit => break, Message::FileErrors(err) => { // eprintln!("Err: {err:?}"); - external_sender.send(SearchResult::SearchErrors(err)).unwrap() + let _ = external_sender.send(SearchResult::SearchErrors(err)); + } + Message::SearchCount(count) => { + let _ = external_sender.send(SearchResult::SearchCount(count)); } } } @@ -499,6 +572,45 @@ mod tests { #[test] fn find_names() { + let file1 = add_demo_file(); + + let (s, r) = channel(); + let mut man = Manager::new(s); + let search = Search { + dir: file1.parent().unwrap().to_string_lossy().to_string(), + name_text: file1.file_name().unwrap().to_string_lossy().to_string(), + contents_text: "41".to_string(), + }; + println!("using search {search:?}"); + man.search(&search); + + //first get interim + let mess = r.recv(); + println!("mess {mess:?}"); + if let Ok(mess) = mess { + println!("{mess:?}"); + match mess { + SearchResult::InterimResult(fi) => { + assert_eq!(fi.matches.len(), 1); + } + _ => panic!("should be interim"), + } + } + + let mess = r.recv(); + println!("mess {mess:?}"); + if let Ok(mess) = mess { + println!("{mess:?}"); + match mess { + SearchResult::FinalResults(fr) => { + assert_eq!(fr.data.len(), 1); + } + _ => panic!("should be final"), + } + } + } + + fn add_demo_file() -> PathBuf { let mut dir = std::env::temp_dir(); println!("Using Temporary directory: {}", dir.display()); @@ -516,25 +628,9 @@ mod tests { if std::fs::write(&file1, "hello\nthere 41 go").is_err() { panic!("could not create file"); + } else { + println!("writing to {file1:?}") } - - let (s, r) = channel(); - let mut man = Manager::new(s); - man.search(Search { - dir: file1.to_string_lossy().to_string(), - name_text: "temp.csv".to_string(), - contents_text: "41".to_string(), - }); - - if let Ok(mess) = r.recv() { - println!("{mess:?}"); - match mess { - SearchResult::FinalResults(_) => panic!(), - SearchResult::InterimResult(fi) => { - assert_eq!(fi.matches.len(), 1); - } - SearchResult::SearchErrors(_) => panic!(), - } - } + file1 } } diff --git a/librusl/src/rgtools.rs b/librusl/src/rgtools.rs index 9fb446b..16d9441 100644 --- a/librusl/src/rgtools.rs +++ b/librusl/src/rgtools.rs @@ -14,7 +14,7 @@ use std::{ io::{Cursor, Write}, path::Path, sync::{ - atomic::{AtomicBool, AtomicUsize, Ordering}, + atomic::{AtomicUsize, Ordering}, Arc, }, }; @@ -36,10 +36,11 @@ pub struct ContentResults { pub fn search_contents( pattern: &str, paths: &[OsString], - allowed_files: Option>, + allowed_files: &HashSet, ops: ContentOptions, - must_stop: Arc, - counter: Arc, + global_search_id: Arc, + start_search_id: usize, + total_search_count: Option>, //only Some if find contents, else None because we would have counted the file in the name search ) -> ContentResults { let case_insensitive = !ops.case_sensitive; let mut errors = vec![]; @@ -68,8 +69,11 @@ pub fn search_contents( .separator_field_match(SEPARATOR.as_bytes().to_vec()) .build_no_color(my_write); - if let Some(allowed_files) = allowed_files { + if allowed_files.len() > 0 { for path in allowed_files { + if global_search_id.load(Ordering::Relaxed) != start_search_id { + return ContentResults::default(); + } read_file( &Path::new(&path), &mut searcher, @@ -77,20 +81,20 @@ pub fn search_contents( &mut printer, &mut errors, &ops, - counter.clone(), + total_search_count.clone(), ); } } else { for path in paths { for result in WalkDir::new(path) { - if must_stop.load(Ordering::Relaxed) { + if global_search_id.load(Ordering::Relaxed) != start_search_id { return ContentResults::default(); } let dent = match result { Ok(dent) => dent, - Err(err) => { - errors.push(err.to_string()); + Err(_err) => { + errors.push(format!("Could not read file {path:?}")); continue; } }; @@ -98,14 +102,21 @@ pub fn search_contents( if !dent.file_type().is_file() { continue; } - read_file(&dent.path(), &mut searcher, &matcher, &mut printer, &mut errors, &ops, counter.clone()); + read_file( + &dent.path(), + &mut searcher, + &matcher, + &mut printer, + &mut errors, + &ops, + total_search_count.clone(), + ); } } } - ContentResults { - results: printer.into_inner().into_inner().string().split('\n').map(|x| x.to_string()).collect(), - errors, - } + let strings: Vec = printer.into_inner().into_inner().string().split('\n').map(|x| x.to_string()).collect(); + + ContentResults { results: strings, errors } } fn read_file( path: &Path, @@ -114,37 +125,43 @@ fn read_file( printer: &mut Standard>, errors: &mut Vec, ops: &ContentOptions, - counter: Arc, + total_search_count: Option>, ) { - let _ = counter.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |f| Some(f + 1)); - + if let Some(total_search_count) = total_search_count.as_ref() { + total_search_count.fetch_add(1, Ordering::Relaxed); + } let file = File::open(path); - if let Ok(file) = file { - //normal grep - let result = searcher.search_file(matcher, &file, printer.sink_with_path(matcher, &path)); - if let Err(err) = result { - errors.push(err.to_string()); - } + match file { + Ok(file) => { + //normal grep + let result = searcher.search_file(matcher, &file, printer.sink_with_path(matcher, &path)); + if let Err(_err) = result { + errors.push(format!("Could not read file {path:?}")); + } - //apply each of extensions - if ops.extended { - let extension = path.extension().unwrap_or_default().to_string_lossy().to_lowercase(); - let extendeds = vec![ExtendedType::Pdf, ExtendedType::Office]; - for ext in extendeds.iter().filter(|a| a.extensions().contains(&extension)) { - if let Ok(data) = ext.to_string(&path) { - let cursor = Cursor::new(data); - let result = searcher.search_reader( - matcher, - cursor, - printer.sink_with_path(matcher, &format!("{}{}{}", path.to_string_lossy(), EXTENSION_SEPARATOR, ext.name())), - ); - if let Err(err) = result { - errors.push(err.to_string()); + //apply each of extensions + if ops.extended { + let extension = path.extension().unwrap_or_default().to_string_lossy().to_lowercase(); + let extendeds = vec![ExtendedType::Pdf, ExtendedType::Office]; + for ext in extendeds.iter().filter(|a| a.extensions().contains(&extension)) { + if let Ok(data) = ext.to_string(&path) { + let cursor = Cursor::new(data); + let result = searcher.search_reader( + matcher, + cursor, + printer.sink_with_path(matcher, &format!("{}{}{}", path.to_string_lossy(), EXTENSION_SEPARATOR, ext.name())), + ); + if let Err(_err) = result { + errors.push(format!("Could not read file {path:?} with extension {ext:?}")); + } + } else { } - } else { } } } + Err(_err) => { + errors.push(format!("Could not read {}", path.as_os_str().to_string_lossy())); + } } } impl MyWrite { diff --git a/librusl/src/search.rs b/librusl/src/search.rs index d833f95..82ed713 100644 --- a/librusl/src/search.rs +++ b/librusl/src/search.rs @@ -1,4 +1,4 @@ -#[derive(Clone)] +#[derive(Clone, Debug)] pub struct Search { pub dir: String, pub name_text: String, diff --git a/slint/Cargo.lock b/slint/Cargo.lock index 7224f2d..d77e227 100644 --- a/slint/Cargo.lock +++ b/slint/Cargo.lock @@ -20,65 +20,67 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eb1adf08c5bcaa8490b9851fd53cca27fa9880076f178ea9d29f05196728a8" +checksum = "ca8410747ed85a17c4a1e9ed3f5a74d3e7bdcc876cf9a18ff40ae21d645997b2" [[package]] name = "accesskit_consumer" -version = "0.15.2" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04bb4d9e4772fe0d47df57d0d5dbe5d85dd05e2f37ae1ddb6b105e76be58fb00" +checksum = "8c17cca53c09fbd7288667b22a201274b9becaa27f0b91bf52a526db95de45e6" dependencies = [ "accesskit", ] [[package]] name = "accesskit_macos" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134d0acf6acb667c89d3332999b1a5df4edbc8d6113910f392ebb73f2b03bb56" +checksum = "cd3b6ae1eabbfbced10e840fd3fce8a93ae84f174b3e4ba892ab7bcb42e477a7" dependencies = [ "accesskit", "accesskit_consumer", - "objc2", + "objc2 0.3.0-beta.3.patch-leaks.3", "once_cell", ] [[package]] name = "accesskit_unix" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e084cb5168790c0c112626175412dc5ad127083441a8248ae49ddf6725519e83" +checksum = "6c8c9b4467d77cacfbc93cee9aa8e7822f6d527c774efdca5f8b3a5280c34847" dependencies = [ "accesskit", "accesskit_consumer", "async-channel", + "async-once-cell", "atspi", "futures-lite", + "once_cell", "serde", "zbus", ] [[package]] name = "accesskit_windows" -version = "0.14.3" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eac0a7f2d7cd7a93b938af401d3d8e8b7094217989a7c25c55a953023436e31" +checksum = "afcae27ec0974fc7c3b0b318783be89fd1b2e66dd702179fe600166a38ff4a0b" dependencies = [ "accesskit", "accesskit_consumer", - "arrayvec", "once_cell", "paste", + "static_assertions", "windows", ] [[package]] name = "accesskit_winit" -version = "0.14.4" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825d23acee1bd6d25cbaa3ca6ed6e73faf24122a774ec33d52c5c86c6ab423c0" +checksum = "5284218aca17d9e150164428a0ebc7b955f70e3a9a78b4c20894513aabf98a67" dependencies = [ "accesskit", "accesskit_macos", @@ -128,6 +130,19 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +dependencies = [ + "cfg-if 1.0.0", + "getrandom", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "0.7.18" @@ -148,20 +163,23 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c77a0045eda8b888c76ea473c2b0515ba6f471d318f8927c5c72240937035a6" +checksum = "052ad56e336bcc615a214bffbeca6c181ee9550acec193f0327e0b103b033a4d" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.4.0", "cc", + "cesu8", + "jni", "jni-sys", "libc", "log", "ndk", "ndk-context", "ndk-sys", - "num_enum 0.5.7", + "num_enum", + "thiserror", ] [[package]] @@ -248,7 +266,7 @@ dependencies = [ "futures-lite", "log", "parking", - "polling", + "polling 2.8.0", "rustix 0.37.23", "slab", "socket2", @@ -264,6 +282,12 @@ dependencies = [ "event-listener", ] +[[package]] +name = "async-once-cell" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" + [[package]] name = "async-process" version = "1.7.0" @@ -339,29 +363,50 @@ checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atspi" -version = "0.10.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e7a3376837b2e7d12d34d58ac47073c491dc3bf6f71a7adaf687d4d817faa" +checksum = "6059f350ab6f593ea00727b334265c4dfc7fd442ee32d264794bd9bdc68e87ca" +dependencies = [ + "atspi-common", + "atspi-connection", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92af95f966d2431f962bc632c2e68eda7777330158bf640c4af4249349b2cdf5" dependencies = [ - "async-recursion", - "async-trait", - "atspi-macros", "enumflags2", - "futures-lite", "serde", - "tracing", + "static_assertions", "zbus", "zbus_names", + "zvariant", ] [[package]] -name = "atspi-macros" -version = "0.2.0" +name = "atspi-connection" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb4870a32c0eaa17e35bca0e6b16020635157121fb7d45593d242c295bc768" +checksum = "a0c65e7d70f86d4c0e3b2d585d9bf3f979f0b19d635a336725a88d279f76b939" dependencies = [ - "quote", - "syn 1.0.109", + "atspi-common", + "atspi-proxies", + "futures-lite", + "zbus", +] + +[[package]] +name = "atspi-proxies" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6495661273703e7a229356dcbe8c8f38223d697aacfaf0e13590a9ac9977bb52" +dependencies = [ + "atspi-common", + "serde", + "zbus", ] [[package]] @@ -408,12 +453,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - [[package]] name = "base64" version = "0.20.0" @@ -428,9 +467,9 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "bindgen" -version = "0.66.1" +version = "0.68.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" dependencies = [ "bitflags 2.4.0", "cexpr", @@ -488,7 +527,16 @@ version = "0.1.0-beta.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", +] + +[[package]] +name = "block-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dd7cf50912cddc06dc5ea7c08c5e81c1b2c842a70d19def1848d54c586fed92" +dependencies = [ + "objc-sys 0.3.1", ] [[package]] @@ -497,8 +545,18 @@ version = "0.2.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" dependencies = [ - "block-sys", - "objc2-encode", + "block-sys 0.1.0-beta.1", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "block2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" +dependencies = [ + "block-sys 0.2.0", + "objc2 0.4.1", ] [[package]] @@ -572,6 +630,12 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + [[package]] name = "cairo-sys-rs" version = "0.18.0" @@ -584,41 +648,61 @@ dependencies = [ [[package]] name = "calloop" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" +checksum = "dea4bfce4c7fbd71e5bb8a7063b6cc7eed48c6d29ee9a08332a59e5d9d93e5c4" dependencies = [ + "bitflags 1.3.2", + "io-lifetimes", "log", - "nix 0.24.2", - "slotmap", + "nix 0.26.4", + "polling 2.8.0", + "slab", "thiserror", - "vec_map", ] [[package]] name = "calloop" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dea4bfce4c7fbd71e5bb8a7063b6cc7eed48c6d29ee9a08332a59e5d9d93e5c4" +checksum = "7b50b5a44d59a98c55a9eeb518f39bf7499ba19fd98ee7d22618687f3f10adbf" dependencies = [ - "bitflags 1.3.2", - "io-lifetimes", + "bitflags 2.4.0", "log", - "nix 0.26.4", - "polling", + "polling 3.3.1", + "rustix 0.38.25", "slab", "thiserror", ] +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop 0.12.3", + "rustix 0.38.25", + "wayland-backend", + "wayland-client", +] + [[package]] name = "cc" -version = "1.0.73" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cexpr" version = "0.6.0" @@ -783,6 +867,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "combine" +version = "4.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +dependencies = [ + "bytes", + "memchr 2.6.3", +] + [[package]] name = "concurrent-queue" version = "2.2.0" @@ -821,16 +915,16 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "copypasta" -version = "0.8.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "133fc8675ee3a4ec9aa513584deda9aa0faeda3586b87f7f0f2ba082c66fb172" +checksum = "6d35364349bf9e9e1c3a035ddcb00d188d23a3c40c50244c03c27a99fc6a65ae" dependencies = [ "clipboard-win 3.1.1", "objc", "objc-foundation", "objc_id", "smithay-clipboard", - "x11-clipboard 0.7.1", + "x11-clipboard 0.8.1", ] [[package]] @@ -1052,6 +1146,12 @@ dependencies = [ "syn 2.0.32", ] +[[package]] +name = "cursor-icon" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" + [[package]] name = "data-url" version = "0.2.0" @@ -1150,11 +1250,11 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dlib" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.7.3", + "libloading 0.8.0", ] [[package]] @@ -1211,12 +1311,6 @@ dependencies = [ "libc", ] -[[package]] -name = "dunce" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" - [[package]] name = "dwrote" version = "0.11.0" @@ -1511,7 +1605,7 @@ dependencies = [ "futures-sink", "nanorand", "pin-project", - "spin 0.9.3", + "spin 0.9.8", ] [[package]] @@ -1619,9 +1713,9 @@ checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand 1.7.0", "futures-core", @@ -1731,16 +1825,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "gethostname" version = "0.3.0" @@ -1753,14 +1837,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "js-sys", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -1847,11 +1931,11 @@ dependencies = [ [[package]] name = "glutin" -version = "0.30.10" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc93b03242719b8ad39fb26ed2b01737144ce7bd4bfc7adadcef806596760fe" +checksum = "eca18d477e18c996c1fd1a50e04c6a745b67e2d512c7fb51f2757d9486a0e3ee" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg_aliases", "cgl", "core-foundation", @@ -1859,42 +1943,43 @@ dependencies = [ "glutin_egl_sys", "glutin_glx_sys", "glutin_wgl_sys", - "libloading 0.7.3", - "objc2", + "icrate", + "libloading 0.8.0", + "objc2 0.4.1", "once_cell", - "raw-window-handle", - "wayland-sys 0.30.1", - "windows-sys 0.45.0", + "raw-window-handle 0.5.2", + "wayland-sys", + "windows-sys 0.48.0", "x11-dl", ] [[package]] name = "glutin-winit" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629a873fc04062830bfe8f97c03773bcd7b371e23bcc465d0a61448cd1588fa4" +checksum = "1ebcdfba24f73b8412c5181e56f092b5eff16671c514ce896b258a0a64bd7735" dependencies = [ "cfg_aliases", "glutin", - "raw-window-handle", + "raw-window-handle 0.5.2", "winit", ] [[package]] name = "glutin_egl_sys" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af784eb26c5a68ec85391268e074f0aa618c096eadb5d6330b0911cf34fe57c5" +checksum = "77cc5623f5309ef433c3dd4ca1223195347fe62c413da8e2fdd0eb76db2d9bcd" dependencies = [ "gl_generator", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "glutin_glx_sys" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b53cb5fe568964aa066a3ba91eac5ecbac869fb0842cd0dc9e412434f1a1494" +checksum = "a165fd686c10dcc2d45380b35796e577eacfd43d4660ee741ec8ebe2201b3b4f" dependencies = [ "gl_generator", "x11-dl", @@ -1902,9 +1987,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef89398e90033fc6bc65e9bd42fd29bbbfd483bda5b56dc5562f455550618165" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" dependencies = [ "gl_generator", ] @@ -2034,7 +2119,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash", + "ahash 0.7.6", ] [[package]] @@ -2078,9 +2163,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "i-slint-backend-linuxkms" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "656ddad754a58f548a9e629b74b4fe130940ad209dd7f448c5fc560e7ef03e8a" +checksum = "8955a5385270c9a8d76530e872a397eb6717bd1020f16c09c7f9c7fc1a59cd39" dependencies = [ "calloop 0.11.0", "drm", @@ -2092,15 +2177,15 @@ dependencies = [ "input", "libseat", "nix 0.27.1", - "raw-window-handle", + "raw-window-handle 0.5.2", "xkbcommon", ] [[package]] name = "i-slint-backend-qt" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97f41677cd91c47e2a937b017dbc60790fdfaf963623ba431ae297a768365b0c" +checksum = "e3d1efb491728deba46aa6554c7589256f5e95f956237b55ab4d9cc098f3ec18" dependencies = [ "const-field-offset", "cpp", @@ -2118,25 +2203,27 @@ dependencies = [ [[package]] name = "i-slint-backend-selector" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f37dd8e87244e80bed732fca918b1ec6a759403f4c94e07a624ef01205d046" +checksum = "059bb78add36aaa9cc1a4f7e5978f47e5ec1ece31ca281451cc646ef3a7e4d85" dependencies = [ "cfg-if 1.0.0", "i-slint-backend-linuxkms", "i-slint-backend-qt", "i-slint-backend-winit", + "i-slint-common", "i-slint-core", ] [[package]] name = "i-slint-backend-winit" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffefd805c549bd09b94efc41cffab925deada56ff2d5577c277a71d8509b0d69" +checksum = "8992e2356a2331502261987d2a6803e798bf7a2a5272907713c08f46a7ad0652" dependencies = [ "accesskit", "accesskit_winit", + "bytemuck", "cfg-if 1.0.0", "cfg_aliases", "cocoa 0.24.0", @@ -2151,11 +2238,10 @@ dependencies = [ "i-slint-renderer-femtovg", "i-slint-renderer-skia", "imgref", - "instant", "lyon_path", "once_cell", "pin-weak", - "raw-window-handle", + "raw-window-handle 0.5.2", "rgb", "scoped-tls-hkt", "scopeguard", @@ -2169,9 +2255,9 @@ dependencies = [ [[package]] name = "i-slint-common" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052399fea61910e2160c5cbb33636a4fa6810e378bd2746bb89e51ca216dec53" +checksum = "181a597710932e4ba09cd29fed3d479587fe33d3c880b0addd5421dbed4940bd" dependencies = [ "cfg-if 1.0.0", "derive_more", @@ -2181,16 +2267,15 @@ dependencies = [ [[package]] name = "i-slint-compiler" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516e2c1a1124eeea8238498a088d6d82edd0fd99207ee417fe45f169646c8346" +checksum = "0020485613a80b6dfe86a46f93c946b8382045ccbb29f7b9faf20725658fc7f0" dependencies = [ "by_address", "codemap", "codemap-diagnostic", "css-color-parser2", "derive_more", - "dunce", "fontdue", "i-slint-common", "image", @@ -2198,7 +2283,7 @@ dependencies = [ "linked_hash_set", "lyon_extra", "lyon_path", - "num_enum 0.7.0", + "num_enum", "once_cell", "proc-macro2", "quote", @@ -2212,9 +2297,9 @@ dependencies = [ [[package]] name = "i-slint-core" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eb7000f825c0356c743d29d06b32f1691e755b5646a49a2ed79f0c15d8a3d50" +checksum = "408aa4fe8a28ae7284d18d0b35612fe172c096392dc429342e3626926c70e595" dependencies = [ "auto_enums", "bytemuck", @@ -2227,7 +2312,6 @@ dependencies = [ "i-slint-common", "i-slint-core-macros", "image", - "instant", "integer-sqrt", "lyon_algorithms", "lyon_extra", @@ -2252,13 +2336,14 @@ dependencies = [ "vtable", "wasm-bindgen", "web-sys", + "web-time", ] [[package]] name = "i-slint-core-macros" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c4dd6821e0eeb85438e9c282d6d58231c09cd36ef961701786f3fc75be2bad" +checksum = "c8d582a1644a5d818ee813f393490a5b2496936ef3962b62ff077e42a81626ef" dependencies = [ "quote", "syn 2.0.32", @@ -2266,9 +2351,9 @@ dependencies = [ [[package]] name = "i-slint-renderer-femtovg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7453ebfd9dc46fb4696d1866d73f22a12a4b56ed1ef44d9aef63960f17085a7" +checksum = "fbc056f6daab6224bb55a55751456ab2897a41ade84ca7772001a1cff46a6b26" dependencies = [ "cfg-if 1.0.0", "const-field-offset", @@ -2282,11 +2367,10 @@ dependencies = [ "i-slint-core", "i-slint-core-macros", "imgref", - "instant", "lyon_path", "once_cell", "pin-weak", - "raw-window-handle", + "raw-window-handle 0.5.2", "rgb", "scoped-tls-hkt", "ttf-parser 0.18.1", @@ -2300,10 +2384,11 @@ dependencies = [ [[package]] name = "i-slint-renderer-skia" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bec98da9efd080e3b45fdc459f247f2dbde566a2539659b365264278fc1081" +checksum = "82c4893627aa07956397bc997b4bcb83a22e1b364f8109be72505168837e2eb7" dependencies = [ + "bytemuck", "cfg-if 1.0.0", "cfg_aliases", "cocoa 0.24.0", @@ -2317,22 +2402,32 @@ dependencies = [ "i-slint-common", "i-slint-core", "i-slint-core-macros", - "instant", "lyon_path", "metal", "objc", "once_cell", "pin-weak", - "raw-window-handle", + "raw-window-handle 0.5.2", "scoped-tls-hkt", "skia-safe", + "softbuffer", "unicode-segmentation", "vtable", "winapi", - "winit", "wio", ] +[[package]] +name = "icrate" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" +dependencies = [ + "block2 0.3.0", + "dispatch", + "objc2 0.4.1", +] + [[package]] name = "idna" version = "0.2.3" @@ -2442,9 +2537,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2482,6 +2574,22 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if 1.0.0", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -2556,9 +2664,9 @@ checksum = "7efd1d698db0759e6ef11a7cd44407407399a910c774dd804c64c032da7826ff" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libloading" @@ -2582,7 +2690,7 @@ dependencies = [ [[package]] name = "librusl" -version = "0.4.0" +version = "0.5.0" dependencies = [ "clipboard", "dirs", @@ -2604,11 +2712,9 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54a0adf8d8607a73a5b74cbe4132f57cb349e4bf860103cd089461bbcbc9907e" dependencies = [ - "cc", "errno", "libseat-sys", "log", - "pkg-config", ] [[package]] @@ -2653,9 +2759,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] name = "lock_api" @@ -2768,36 +2874,36 @@ checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memmap2" -version = "0.3.1" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b6c2ebff6180198788f5db08d7ce3bc1d0b617176678831a7510825973e357" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ "libc", ] [[package]] name = "memmap2" -version = "0.5.10" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" dependencies = [ "libc", ] [[package]] name = "memmap2" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" +checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" dependencies = [ "libc", ] [[package]] name = "memmap2" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" dependencies = [ "libc", ] @@ -2858,18 +2964,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.36.1", -] - [[package]] name = "msdos_time" version = "0.1.6" @@ -2891,15 +2985,17 @@ dependencies = [ [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "jni-sys", + "log", "ndk-sys", - "num_enum 0.5.7", - "raw-window-handle", + "num_enum", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "thiserror", ] @@ -2911,38 +3007,13 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.4.0" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] -[[package]] -name = "nix" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", -] - -[[package]] -name = "nix" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" -dependencies = [ - "bitflags 1.3.2", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", -] - [[package]] name = "nix" version = "0.26.4" @@ -2953,7 +3024,6 @@ dependencies = [ "cfg-if 1.0.0", "libc", "memoffset 0.7.1", - "pin-utils", ] [[package]] @@ -3028,34 +3098,13 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" -dependencies = [ - "num_enum_derive 0.5.7", -] - [[package]] name = "num_enum" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" dependencies = [ - "num_enum_derive 0.7.0", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", + "num_enum_derive", ] [[package]] @@ -3097,15 +3146,31 @@ version = "0.2.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +[[package]] +name = "objc-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99e1d07c6eab1ce8b6382b8e3c7246fe117ff3f8b34be065f5ebace6749fe845" + [[package]] name = "objc2" version = "0.3.0-beta.3.patch-leaks.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" dependencies = [ - "block2", - "objc-sys", - "objc2-encode", + "block2 0.2.0-alpha.6", + "objc-sys 0.2.0-beta.2", + "objc2-encode 2.0.0-pre.2", +] + +[[package]] +name = "objc2" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +dependencies = [ + "objc-sys 0.3.1", + "objc2-encode 3.0.0", ] [[package]] @@ -3114,9 +3179,15 @@ version = "2.0.0-pre.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" dependencies = [ - "objc-sys", + "objc-sys 0.2.0-beta.2", ] +[[package]] +name = "objc2-encode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" + [[package]] name = "objc_exception" version = "0.1.2" @@ -3332,6 +3403,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +dependencies = [ + "cfg-if 1.0.0", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.25", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "pom" version = "1.1.0" @@ -3418,9 +3503,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.28.2" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" dependencies = [ "memchr 2.6.3", ] @@ -3470,6 +3555,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" +[[package]] +name = "raw-window-handle" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a9830a0e1b9fb145ebb365b8bc4ccd75f290f98c0247deafbbe2c75cefb544" + [[package]] name = "rayon" version = "1.5.2" @@ -3518,6 +3609,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -3600,7 +3700,7 @@ dependencies = [ "objc", "objc-foundation", "objc_id", - "raw-window-handle", + "raw-window-handle 0.5.2", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3626,11 +3726,25 @@ dependencies = [ "libc", "once_cell", "spin 0.5.2", - "untrusted", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +dependencies = [ + "cc", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.48.0", +] + [[package]] name = "rowan" version = "0.15.10" @@ -3664,7 +3778,7 @@ dependencies = [ [[package]] name = "rusl" -version = "0.2.0" +version = "0.3.0" dependencies = [ "librusl", "rfd", @@ -3718,27 +3832,37 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.13" +version = "0.38.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" +checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" dependencies = [ "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.7", + "linux-raw-sys 0.4.11", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" dependencies = [ "log", - "ring", + "ring 0.17.5", + "rustls-webpki", "sct", - "webpki", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.5", + "untrusted 0.9.0", ] [[package]] @@ -3808,21 +3932,21 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", ] [[package]] name = "sctk-adwaita" -version = "0.5.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +checksum = "1729a30a469de249c6effc17ec8d039b0aa29b3af79b819b7f51cb6ab8046a90" dependencies = [ "ab_glyph", "log", - "memmap2 0.5.10", - "smithay-client-toolkit 0.16.0", - "tiny-skia 0.8.4", + "memmap2 0.9.0", + "smithay-client-toolkit", + "tiny-skia 0.11.2", ] [[package]] @@ -3959,9 +4083,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "skia-bindings" -version = "0.64.0" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a30c13184ca65af3a989ea2efe8803335d011800c0c738ef89e003b69e08e6" +checksum = "0af1b86d01552a56d70b515e2bc1af9123acffcc679a7410010e2648f59fbec3" dependencies = [ "bindgen", "cc", @@ -3971,15 +4095,15 @@ dependencies = [ "regex", "serde_json", "tar", - "toml 0.7.8", + "toml 0.8.2", "ureq", ] [[package]] name = "skia-safe" -version = "0.64.0" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace543b27749a9cade9fe57d0aadddd2fe1a99563f2976401966bda84b47284f" +checksum = "ed678303df69daf5b666faf477800ff7fcb7b67316b10a94c31d748d42dd5a83" dependencies = [ "bitflags 2.4.0", "lazy_static", @@ -3999,9 +4123,9 @@ dependencies = [ [[package]] name = "slint" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6b559ea8a79e827cf3e19ef35b32c6b9ccf6bc556e0380e3d32a15df392529" +checksum = "3b9d589a30c2812877798eecf2b5cb51e7f2c4531f7c9e8746be6b25a24f37e6" dependencies = [ "const-field-offset", "i-slint-backend-selector", @@ -4016,21 +4140,21 @@ dependencies = [ [[package]] name = "slint-build" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1795a08d012454a3f30531346175a0ce75108a6dd933944980abcf94ae8dad" +checksum = "2edbdfb7bdb1688273656c301ffa221a3939869620e7a12f02d7cae6532098ee" dependencies = [ "i-slint-compiler", "spin_on", "thiserror", - "toml_edit 0.19.15", + "toml_edit 0.20.2", ] [[package]] name = "slint-macros" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f7f0cb8d6e0f26b98cdff27e5eac19abca6e4c331e5c094f24ee2d2f4ab14" +checksum = "ee1b8b49389eb768793499fce1c60d613ac52d14fe77383a65f233327cd65715" dependencies = [ "i-slint-compiler", "proc-macro2", @@ -4055,49 +4179,38 @@ checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smithay-client-toolkit" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a28f16a97fa0e8ce563b2774d1e732dd5d4025d2772c5dba0a41a0f90a29da3" -dependencies = [ - "bitflags 1.3.2", - "dlib", - "lazy_static", - "log", - "memmap2 0.3.1", - "nix 0.22.3", - "pkg-config", - "wayland-client 0.29.5", - "wayland-cursor", - "wayland-protocols", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "60e3d9941fa3bacf7c2bf4b065304faa14164151254cd16ce1b1bc8fc381600f" dependencies = [ - "bitflags 1.3.2", - "calloop 0.10.1", - "dlib", - "lazy_static", + "bitflags 2.4.0", + "calloop 0.12.3", + "calloop-wayland-source", + "cursor-icon", + "libc", "log", - "memmap2 0.5.10", - "nix 0.24.2", - "pkg-config", - "wayland-client 0.29.5", + "memmap2 0.9.0", + "rustix 0.38.25", + "thiserror", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", "wayland-cursor", "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", ] [[package]] name = "smithay-clipboard" -version = "0.6.5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610b551bd25378bfd2b8e7a0fcbd83d427e8f2f6a40c47ae0f70688e9949dd55" +checksum = "0bb62b280ce5a5cba847669933a0948d00904cf83845c944eae96a4738cea1a6" dependencies = [ - "smithay-client-toolkit 0.15.4", - "wayland-client 0.29.5", + "libc", + "smithay-client-toolkit", + "wayland-backend", ] [[package]] @@ -4121,34 +4234,32 @@ dependencies = [ [[package]] name = "softbuffer" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd56fe5e6c6f1881aad2bd37acaef4ac4a3689c970dfcbd87a36a6e60210ec8" +checksum = "826da2ead8e85d1b4ea579fae3d58ec10c81a77d61deab8918c4a4f7514b2948" dependencies = [ "as-raw-xcb-connection", "bytemuck", "cfg_aliases", "cocoa 0.25.0", "core-graphics 0.23.1", - "drm", - "drm-sys", "fastrand 2.0.0", "foreign-types 0.5.0", "js-sys", "log", - "memmap2 0.7.1", - "nix 0.26.4", + "memmap2 0.9.0", "objc", - "raw-window-handle", - "redox_syscall 0.3.5", + "raw-window-handle 0.5.2", + "redox_syscall 0.4.1", + "rustix 0.38.25", "tiny-xlib", "wasm-bindgen", "wayland-backend", - "wayland-client 0.30.2", - "wayland-sys 0.30.1", + "wayland-client", + "wayland-sys", "web-sys", "windows-sys 0.48.0", - "x11rb 0.12.0", + "x11rb", ] [[package]] @@ -4159,9 +4270,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.3" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] @@ -4283,15 +4394,15 @@ dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.13", + "rustix 0.38.25", "windows-sys 0.48.0", ] [[package]] name = "termcolor" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] @@ -4392,38 +4503,38 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.8.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" dependencies = [ "arrayref", "arrayvec", "bytemuck", "cfg-if 1.0.0", + "log", "png", - "tiny-skia-path 0.8.4", + "tiny-skia-path 0.10.0", ] [[package]] name = "tiny-skia" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7db11798945fa5c3e5490c794ccca7c6de86d3afdd54b4eb324109939c6f37bc" +checksum = "3b72a92a05db376db09fe6d50b7948d106011761c05a6a45e23e17ee9b556222" dependencies = [ "arrayref", "arrayvec", "bytemuck", "cfg-if 1.0.0", "log", - "png", - "tiny-skia-path 0.10.0", + "tiny-skia-path 0.11.2", ] [[package]] name = "tiny-skia-path" -version = "0.8.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +checksum = "2f60aa35c89ac2687ace1a2556eaaea68e8c0d47408a2e3e7f5c98a489e7281c" dependencies = [ "arrayref", "bytemuck", @@ -4432,9 +4543,9 @@ dependencies = [ [[package]] name = "tiny-skia-path" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f60aa35c89ac2687ace1a2556eaaea68e8c0d47408a2e3e7f5c98a489e7281c" +checksum = "6ac3865b9708fc7e1961a65c3a4fa55e984272f33092d3c859929f887fceb647" dependencies = [ "arrayref", "bytemuck", @@ -4477,18 +4588,6 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", -] - [[package]] name = "toml" version = "0.8.2" @@ -4517,8 +4616,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -4706,19 +4803,25 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "ureq" -version = "2.6.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" +checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" dependencies = [ - "base64 0.13.0", + "base64 0.21.0", "flate2", "log", "once_cell", "rustls", + "rustls-webpki", "url", - "webpki", "webpki-roots", ] @@ -4795,12 +4898,6 @@ dependencies = [ "tiny-skia-path 0.10.0", ] -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version-compare" version = "0.1.0" @@ -4852,12 +4949,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4932,124 +5023,110 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wayland-backend" -version = "0.1.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b48e27457e8da3b2260ac60d0a94512f5cba36448679f3747c0865b7893ed8" +checksum = "19152ddd73f45f024ed4534d9ca2594e0ef252c1847695255dae47f34df9fbe4" dependencies = [ "cc", "downcast-rs", - "io-lifetimes", "nix 0.26.4", "scoped-tls", "smallvec", - "wayland-sys 0.30.1", -] - -[[package]] -name = "wayland-client" -version = "0.29.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" -dependencies = [ - "bitflags 1.3.2", - "downcast-rs", - "libc", - "nix 0.24.2", - "scoped-tls", - "wayland-commons", - "wayland-scanner 0.29.5", - "wayland-sys 0.29.5", + "wayland-sys", ] [[package]] name = "wayland-client" -version = "0.30.2" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489c9654770f674fc7e266b3c579f4053d7551df0ceb392f153adb1f9ed06ac8" +checksum = "1ca7d52347346f5473bf2f56705f360e8440873052e575e55890c4fa57843ed3" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "nix 0.26.4", "wayland-backend", - "wayland-scanner 0.30.1", + "wayland-scanner", ] [[package]] -name = "wayland-commons" -version = "0.29.5" +name = "wayland-csd-frame" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "nix 0.24.2", - "once_cell", - "smallvec", - "wayland-sys 0.29.5", + "bitflags 2.4.0", + "cursor-icon", + "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.29.4" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52758f13d5e7861fc83d942d3d99bf270c83269575e52ac29e5b73cb956a6bd" +checksum = "a44aa20ae986659d6c77d64d808a046996a932aa763913864dc40c359ef7ad5b" dependencies = [ - "nix 0.22.3", - "wayland-client 0.29.5", + "nix 0.26.4", + "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.29.5" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +checksum = "e253d7107ba913923dc253967f35e8561a3c65f914543e46843c88ddd729e21c" dependencies = [ - "bitflags 1.3.2", - "wayland-client 0.29.5", - "wayland-commons", - "wayland-scanner 0.29.5", + "bitflags 2.4.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", ] [[package]] -name = "wayland-scanner" -version = "0.29.5" +name = "wayland-protocols-plasma" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" dependencies = [ - "proc-macro2", - "quote", - "xml-rs", + "bitflags 2.4.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] -name = "wayland-scanner" -version = "0.30.1" +name = "wayland-protocols-wlr" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b873b257fbc32ec909c0eb80dea312076a67014e65e245f5eb69a6b8ab330e" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" dependencies = [ - "proc-macro2", - "quick-xml 0.28.2", - "quote", + "bitflags 2.4.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", ] [[package]] -name = "wayland-sys" -version = "0.29.5" +name = "wayland-scanner" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +checksum = "fb8e28403665c9f9513202b7e1ed71ec56fde5c107816843fb14057910b2c09c" dependencies = [ - "dlib", - "lazy_static", - "pkg-config", + "proc-macro2", + "quick-xml 0.30.0", + "quote", ] [[package]] name = "wayland-sys" -version = "0.30.1" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b2a02ac608e07132978689a6f9bf4214949c85998c247abadd4f4129b1aa06" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" dependencies = [ "dlib", - "lazy_static", "log", + "once_cell", "pkg-config", ] @@ -5064,23 +5141,20 @@ dependencies = [ ] [[package]] -name = "webpki" -version = "0.22.0" +name = "web-time" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "57099a701fb3a8043f993e8228dc24229c7b942e2b009a1b962e54489ba1d3bf" dependencies = [ - "ring", - "untrusted", + "js-sys", + "wasm-bindgen", ] [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "weezl" @@ -5172,19 +5246,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -5203,6 +5264,15 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -5233,6 +5303,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5246,10 +5331,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] name = "windows_aarch64_msvc" @@ -5264,10 +5349,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] -name = "windows_i686_gnu" -version = "0.36.1" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] name = "windows_i686_gnu" @@ -5282,10 +5367,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] -name = "windows_i686_msvc" -version = "0.36.1" +name = "windows_i686_gnu" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" [[package]] name = "windows_i686_msvc" @@ -5300,10 +5385,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" +name = "windows_i686_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" [[package]] name = "windows_x86_64_gnu" @@ -5317,6 +5402,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -5330,10 +5421,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" +name = "windows_x86_64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" [[package]] name = "windows_x86_64_msvc" @@ -5347,39 +5438,59 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winit" -version = "0.28.6" +version = "0.29.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" +checksum = "d25d662bb83b511acd839534bb2d88521b0bbc81440969cb077d23c4db9e62c7" dependencies = [ + "ahash 0.8.6", "android-activity", - "bitflags 1.3.2", + "atomic-waker", + "bitflags 2.4.0", + "bytemuck", + "calloop 0.12.3", "cfg_aliases", "core-foundation", - "core-graphics 0.22.3", - "dispatch", - "instant", + "core-graphics 0.23.1", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", + "memmap2 0.9.0", "ndk", - "objc2", + "ndk-sys", + "objc2 0.4.1", "once_cell", "orbclient", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.5.2", + "raw-window-handle 0.6.0", "redox_syscall 0.3.5", + "rustix 0.38.25", "sctk-adwaita", - "smithay-client-toolkit 0.16.0", + "smithay-client-toolkit", + "smol_str", + "unicode-segmentation", "wasm-bindgen", - "wayland-client 0.29.5", - "wayland-commons", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", "wayland-protocols", - "wayland-scanner 0.29.5", + "wayland-protocols-plasma", "web-sys", - "windows-sys 0.45.0", + "web-time", + "windows-sys 0.48.0", "x11-dl", + "x11rb", + "xkbcommon-dl", ] [[package]] @@ -5411,11 +5522,11 @@ dependencies = [ [[package]] name = "x11-clipboard" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "980b9aa9226c3b7de8e2adb11bf20124327c054e0e5812d2aac0b5b5a87e7464" +checksum = "b41aca1115b1f195f21c541c5efb423470848d48143127d0f07f8b90c27440df" dependencies = [ - "x11rb 0.10.1", + "x11rb", ] [[package]] @@ -5429,19 +5540,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592b4883219f345e712b3209c62654ebda0bb50887f330cbd018d0f654bfd507" -dependencies = [ - "gethostname 0.2.3", - "nix 0.24.2", - "winapi", - "winapi-wsapoll", - "x11rb-protocol 0.10.0", -] - [[package]] name = "x11rb" version = "0.12.0" @@ -5449,23 +5547,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" dependencies = [ "as-raw-xcb-connection", - "gethostname 0.3.0", + "gethostname", "libc", "libloading 0.7.3", "nix 0.26.4", "once_cell", "winapi", "winapi-wsapoll", - "x11rb-protocol 0.12.0", -] - -[[package]] -name = "x11rb-protocol" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56b245751c0ac9db0e006dc812031482784e434630205a93c73cfefcaabeac67" -dependencies = [ - "nix 0.24.2", + "x11rb-protocol", ] [[package]] @@ -5526,6 +5615,19 @@ dependencies = [ "xkeysym", ] +[[package]] +name = "xkbcommon-dl" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6924668544c48c0133152e7eec86d644a056ca3d09275eb8d5cdb9855f9d8699" +dependencies = [ + "bitflags 2.4.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + [[package]] name = "xkeysym" version = "0.2.0" @@ -5616,6 +5718,26 @@ dependencies = [ "zvariant", ] +[[package]] +name = "zerocopy" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + [[package]] name = "zip" version = "0.2.8" diff --git a/slint/Cargo.toml b/slint/Cargo.toml index d6d241f..fee1445 100644 --- a/slint/Cargo.toml +++ b/slint/Cargo.toml @@ -1,18 +1,16 @@ [package] name = "rusl" -version = "0.2.0" +version = "0.3.0" edition = "2021" build = "build.rs" [dependencies] librusl={path="../librusl"} -rfd = "0.12.0" #for selecting directory slint = -slint = "1.2.0" #GUI - - +rfd = "0.12" #for selecting directory slint = +slint = "1.3" #GUI [build-dependencies] -slint-build = "1.2.0" #slint GUI +slint-build = "1.3" #slint GUI diff --git a/slint/src/main.rs b/slint/src/main.rs index abd317b..271bec8 100644 --- a/slint/src/main.rs +++ b/slint/src/main.rs @@ -5,6 +5,8 @@ use librusl::manager::{Manager, SearchResult}; use librusl::options::{FTypes, Sort}; use librusl::search::Search; use std::sync::mpsc; +use std::time::Instant; +use std::vec; use std::{ path::PathBuf, sync::{Arc, Mutex}, @@ -38,29 +40,41 @@ pub fn main() { let weak = weak_receiver.clone(); let mut current: Vec = vec![]; let mut counter = 0; + let mut last_update = Instant::now(); loop { match result_receiver.recv().unwrap() { SearchResult::FinalResults(res) => { set_data(weak.clone(), res.data.iter().map(|x| x.to_owned()).collect(), res.duration, true); current.clear(); counter = 0; - + let count = res.data.len(); *results_receiver.lock().unwrap() = res.data; + let _ = weak.upgrade_in_event_loop(move |weak| { + weak.set_searching(false); + weak.set_find_button("Find".into()); + weak.set_message(format!("Found {count} in {:.3}s", res.duration.as_secs_f64()).into()); + }); } SearchResult::InterimResult(res) => { counter += 1; if current.len() < 1000 { current.push(res); - set_data( - weak.clone(), - current.iter().map(|x| x.to_owned()).collect(), - Duration::from_secs(0), - false, - ); + + if last_update.elapsed() > Duration::from_millis(100) { + set_data( + weak.clone(), + current.iter().map(|x| x.to_owned()).collect(), + Duration::from_secs(0), + false, + ); + last_update = Instant::now(); + } } + let _ = weak.upgrade_in_event_loop(move |weak| weak.set_message(format!("Found {counter} ...").into())); } SearchResult::SearchErrors(_) => {} + SearchResult::SearchCount(_) => {} }; } }); @@ -72,6 +86,8 @@ pub fn main() { let weak = weak_edited.clone().unwrap(); let name_text = weak.get_find_text().as_str().to_string(); let content_text = weak.get_content_find_text().as_str().to_string(); + let searching = weak.get_searching(); + let dir = weak.get_directory().as_str().to_owned(); let search = Search { name_text: name_text.to_string(), @@ -95,7 +111,18 @@ pub fn main() { weak.set_message("Searching...".into()); - manager.search(search); + if searching { + manager.stop(); + weak.set_searching(false); + weak.set_find_button("Find".into()); + } else { + weak.set_searching(true); + weak.set_find_button("Stop".into()); + let model = VecModel::::from(vec![]); + let modelrc = ModelRc::new(model); + weak.set_files(modelrc); + manager.search(&search); + } }); //on change sort method, we resort diff --git a/slint/src/mainwindow.slint b/slint/src/mainwindow.slint index f95185e..6c34953 100644 --- a/slint/src/mainwindow.slint +++ b/slint/src/mainwindow.slint @@ -16,6 +16,8 @@ export component MainWindow inherits Window { in-out property export_enabled:false; in-out property selected_sort:"None"; in-out property error_dir:false; + in-out property searching; + in-out property find_button:"Find"; callback sort_changed(); callback search(); @@ -119,7 +121,7 @@ export component MainWindow inherits Window { height:50px; Button { - text: "Find"; + text: root.find-button; height: 40px; width: 80px; clicked => { search(); }