windows_async/lib.rs
1//! Simple async executor for windows application using
2//! [windows](https://github.com/microsoft/windows-rs) crate.
3//!
4//! # Examples
5//! ```
6//! // Show Desktop App list example (using WinRT "Windows.Inventory.InstalledDesktopApp")
7//!
8//! use windows::core::{
9//! Result,
10//! };
11//!
12//! use windows::System::Inventory::{
13//! InstalledDesktopApp,
14//! };
15//!
16//! async fn show_installed_desktop_app() -> Result<()> {
17//!
18//! let vec = InstalledDesktopApp::GetInventoryAsync()?.await?;
19//!
20//! for i in 0..vec.Size()? {
21//! let item = vec.GetAt(i)?;
22//! println!("Id: {:?}", item.Id()?);
23//! println!("DisplayName: {:?}", item.DisplayName()?);
24//! println!("Publisher: {:?}", item.Publisher()?);
25//! println!("DisplayVersion: {:?}", item.DisplayVersion()?);
26//! println!();
27//! }
28//!
29//! Ok(())
30//! }
31//!
32//! fn main() {
33//! if let Err(e) = windows_async::block_on(show_installed_desktop_app()) {
34//! println!("error: {:?}", e);
35//! }
36//! }
37//! ```
38//!
39
40mod executor;
41
42pub use executor::{
43 block_on,
44 create_dummy_window,
45 DummyWindow,
46};