Skip to content

Commit

Permalink
windows-future
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Feb 14, 2025
1 parent 09534e4 commit 3174af0
Show file tree
Hide file tree
Showing 247 changed files with 2,648 additions and 2,648 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ jobs:
run: cargo clippy -p tool_yml
- name: Clippy windows
run: cargo clippy -p windows
- name: Clippy windows-async
run: cargo clippy -p windows-async
- name: Clippy windows-bindgen
run: cargo clippy -p windows-bindgen
- name: Clippy windows-collections
run: cargo clippy -p windows-collections
- name: Clippy windows-core
run: cargo clippy -p windows-core
- name: Clippy windows-future
run: cargo clippy -p windows-future
- name: Clippy windows-implement
run: cargo clippy -p windows-implement
- name: Clippy windows-interface
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msrv-windows-async.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: windows-async
name: windows-future

on:
pull_request:
Expand All @@ -24,4 +24,4 @@ jobs:
- name: Prepare
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- name: Check
run: cargo check -p windows-async --all-features
run: cargo check -p windows-future --all-features
4 changes: 2 additions & 2 deletions .github/workflows/no-default-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
run: cargo check -p helpers --no-default-features
- name: Check windows
run: cargo check -p windows --no-default-features
- name: Check windows-async
run: cargo check -p windows-async --no-default-features
- name: Check windows-bindgen
run: cargo check -p windows-bindgen --no-default-features
- name: Check windows-collections
run: cargo check -p windows-collections --no-default-features
- name: Check windows-core
run: cargo check -p windows-core --no-default-features
- name: Check windows-future
run: cargo check -p windows-future --no-default-features
- name: Check windows-implement
run: cargo check -p windows-implement --no-default-features
- name: Check windows-interface
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/raw-dylib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,14 @@ jobs:
run: cargo test -p tool_yml --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows
run: cargo test -p windows --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-async
run: cargo test -p windows-async --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-bindgen
run: cargo test -p windows-bindgen --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-collections
run: cargo test -p windows-collections --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-core
run: cargo test -p windows-core --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-future
run: cargo test -p windows-future --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-implement
run: cargo test -p windows-implement --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-interface
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ jobs:
run: cargo test -p tool_yml --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows
run: cargo test -p windows --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-async
run: cargo test -p windows-async --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-bindgen
run: cargo test -p windows-bindgen --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-collections
run: cargo test -p windows-collections --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-core
run: cargo test -p windows-core --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-future
run: cargo test -p windows-future --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-implement
run: cargo test -p windows-implement --target ${{ matrix.target }} ${{ matrix.etc }}
- name: Test windows-interface
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(windows_raw_dylib, windows
[workspace.dependencies]
cppwinrt = { path = "crates/libs/cppwinrt" }
windows = { path = "crates/libs/windows" }
windows-async = { path = "crates/libs/async" }
windows-bindgen = { path = "crates/libs/bindgen" }
windows-collections = { path = "crates/libs/collections" }
windows-core = { path = "crates/libs/core" }
windows-future = { path = "crates/libs/future" }
windows-link = { path = "crates/libs/link" }
windows-numerics = { path = "crates/libs/numerics" }
windows-registry = { path = "crates/libs/registry" }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "windows-async"
name = "windows-future"
version = "0.1.0"
edition = "2021"
rust-version = "1.74"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Windows async types

The [windows-async](https://crates.io/crates/windows-async) crate provides stock async support for Windows APIs.
The [windows-future](https://crates.io/crates/windows-future) crate provides stock async support for Windows APIs.

* [Getting started](https://kennykerr.ca/rust-getting-started/)
* [Samples](https://github.com/microsoft/windows-rs/tree/master/crates/samples)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions crates/libs/windows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ version = "0.1.0"
path = "../numerics"
default-features = false

[dependencies.windows-async]
[dependencies.windows-future]
version = "0.1.0"
path = "../async"
path = "../future"
default-features = false

[features]
Expand Down
12 changes: 6 additions & 6 deletions crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ impl LearningModel {
}
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromStorageFileAsync<P0>(modelfile: P0) -> windows_core::Result<windows_async::IAsyncOperation<LearningModel>>
pub fn LoadFromStorageFileAsync<P0>(modelfile: P0) -> windows_core::Result<windows_future::IAsyncOperation<LearningModel>>
where
P0: windows_core::Param<super::super::Storage::IStorageFile>,
{
Expand All @@ -1174,7 +1174,7 @@ impl LearningModel {
})
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromStreamAsync<P0>(modelstream: P0) -> windows_core::Result<windows_async::IAsyncOperation<LearningModel>>
pub fn LoadFromStreamAsync<P0>(modelstream: P0) -> windows_core::Result<windows_future::IAsyncOperation<LearningModel>>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStreamReference>,
{
Expand All @@ -1200,7 +1200,7 @@ impl LearningModel {
})
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromStorageFileWithOperatorProviderAsync<P0, P1>(modelfile: P0, operatorprovider: P1) -> windows_core::Result<windows_async::IAsyncOperation<LearningModel>>
pub fn LoadFromStorageFileWithOperatorProviderAsync<P0, P1>(modelfile: P0, operatorprovider: P1) -> windows_core::Result<windows_future::IAsyncOperation<LearningModel>>
where
P0: windows_core::Param<super::super::Storage::IStorageFile>,
P1: windows_core::Param<ILearningModelOperatorProvider>,
Expand All @@ -1211,7 +1211,7 @@ impl LearningModel {
})
}
#[cfg(feature = "Storage_Streams")]
pub fn LoadFromStreamWithOperatorProviderAsync<P0, P1>(modelstream: P0, operatorprovider: P1) -> windows_core::Result<windows_async::IAsyncOperation<LearningModel>>
pub fn LoadFromStreamWithOperatorProviderAsync<P0, P1>(modelstream: P0, operatorprovider: P1) -> windows_core::Result<windows_future::IAsyncOperation<LearningModel>>
where
P0: windows_core::Param<super::super::Storage::Streams::IRandomAccessStreamReference>,
P1: windows_core::Param<ILearningModelOperatorProvider>,
Expand Down Expand Up @@ -1537,7 +1537,7 @@ impl LearningModelSession {
(windows_core::Interface::vtable(this).EvaluationProperties)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn EvaluateAsync<P0>(&self, bindings: P0, correlationid: &windows_core::HSTRING) -> windows_core::Result<windows_async::IAsyncOperation<LearningModelEvaluationResult>>
pub fn EvaluateAsync<P0>(&self, bindings: P0, correlationid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<LearningModelEvaluationResult>>
where
P0: windows_core::Param<LearningModelBinding>,
{
Expand All @@ -1547,7 +1547,7 @@ impl LearningModelSession {
(windows_core::Interface::vtable(this).EvaluateAsync)(windows_core::Interface::as_raw(this), bindings.param().abi(), core::mem::transmute_copy(correlationid), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn EvaluateFeaturesAsync<P0>(&self, features: P0, correlationid: &windows_core::HSTRING) -> windows_core::Result<windows_async::IAsyncOperation<LearningModelEvaluationResult>>
pub fn EvaluateFeaturesAsync<P0>(&self, features: P0, correlationid: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<LearningModelEvaluationResult>>
where
P0: windows_core::Param<windows_collections::IMap<windows_core::HSTRING, windows_core::IInspectable>>,
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ impl AppExtension {
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn GetExtensionPropertiesAsync(&self) -> windows_core::Result<windows_async::IAsyncOperation<super::super::Foundation::Collections::IPropertySet>> {
pub fn GetExtensionPropertiesAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Foundation::Collections::IPropertySet>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetExtensionPropertiesAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Storage_Search")]
pub fn GetPublicFolderAsync(&self) -> windows_core::Result<windows_async::IAsyncOperation<super::super::Storage::StorageFolder>> {
pub fn GetPublicFolderAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<super::super::Storage::StorageFolder>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
Expand Down Expand Up @@ -102,14 +102,14 @@ unsafe impl Sync for AppExtension {}
pub struct AppExtensionCatalog(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(AppExtensionCatalog, windows_core::IUnknown, windows_core::IInspectable);
impl AppExtensionCatalog {
pub fn FindAllAsync(&self) -> windows_core::Result<windows_async::IAsyncOperation<windows_collections::IVectorView<AppExtension>>> {
pub fn FindAllAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<AppExtension>>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAllAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RequestRemovePackageAsync(&self, packagefullname: &windows_core::HSTRING) -> windows_core::Result<windows_async::IAsyncOperation<bool>> {
pub fn RequestRemovePackageAsync(&self, packagefullname: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub struct AppServiceCatalog;
impl AppServiceCatalog {
pub fn FindAppServiceProvidersAsync(appservicename: &windows_core::HSTRING) -> windows_core::Result<windows_async::IAsyncOperation<windows_collections::IVectorView<super::AppInfo>>> {
pub fn FindAppServiceProvidersAsync(appservicename: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<windows_collections::IVectorView<super::AppInfo>>> {
Self::IAppServiceCatalogStatics(|this| unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FindAppServiceProvidersAsync)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(appservicename), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
Expand Down Expand Up @@ -89,15 +89,15 @@ impl AppServiceConnection {
let this = self;
unsafe { (windows_core::Interface::vtable(this).SetPackageFamilyName)(windows_core::Interface::as_raw(this), core::mem::transmute_copy(value)).ok() }
}
pub fn OpenAsync(&self) -> windows_core::Result<windows_async::IAsyncOperation<AppServiceConnectionStatus>> {
pub fn OpenAsync(&self) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceConnectionStatus>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OpenAsync)(windows_core::Interface::as_raw(this), &mut result__).and_then(|| windows_core::Type::from_abi(result__))
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn SendMessageAsync<P0>(&self, message: P0) -> windows_core::Result<windows_async::IAsyncOperation<AppServiceResponse>>
pub fn SendMessageAsync<P0>(&self, message: P0) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceResponse>>
where
P0: windows_core::Param<super::super::Foundation::Collections::ValueSet>,
{
Expand Down Expand Up @@ -136,7 +136,7 @@ impl AppServiceConnection {
unsafe { (windows_core::Interface::vtable(this).RemoveServiceClosed)(windows_core::Interface::as_raw(this), token).ok() }
}
#[cfg(feature = "System_RemoteSystems")]
pub fn OpenRemoteAsync<P0>(&self, remotesystemconnectionrequest: P0) -> windows_core::Result<windows_async::IAsyncOperation<AppServiceConnectionStatus>>
pub fn OpenRemoteAsync<P0>(&self, remotesystemconnectionrequest: P0) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceConnectionStatus>>
where
P0: windows_core::Param<super::super::System::RemoteSystems::RemoteSystemConnectionRequest>,
{
Expand All @@ -163,7 +163,7 @@ impl AppServiceConnection {
unsafe { (windows_core::Interface::vtable(this).SetUser)(windows_core::Interface::as_raw(this), value.param().abi()).ok() }
}
#[cfg(all(feature = "Foundation_Collections", feature = "System_RemoteSystems"))]
pub fn SendStatelessMessageAsync<P0, P1, P2>(connection: P0, connectionrequest: P1, message: P2) -> windows_core::Result<windows_async::IAsyncOperation<StatelessAppServiceResponse>>
pub fn SendStatelessMessageAsync<P0, P1, P2>(connection: P0, connectionrequest: P1, message: P2) -> windows_core::Result<windows_future::IAsyncOperation<StatelessAppServiceResponse>>
where
P0: windows_core::Param<AppServiceConnection>,
P1: windows_core::Param<super::super::System::RemoteSystems::RemoteSystemConnectionRequest>,
Expand Down Expand Up @@ -254,7 +254,7 @@ impl AppServiceRequest {
}
}
#[cfg(feature = "Foundation_Collections")]
pub fn SendResponseAsync<P0>(&self, message: P0) -> windows_core::Result<windows_async::IAsyncOperation<AppServiceResponseStatus>>
pub fn SendResponseAsync<P0>(&self, message: P0) -> windows_core::Result<windows_future::IAsyncOperation<AppServiceResponseStatus>>
where
P0: windows_core::Param<super::super::Foundation::Collections::ValueSet>,
{
Expand Down Expand Up @@ -397,7 +397,7 @@ impl AppServiceTriggerDetails {
(windows_core::Interface::vtable(this).IsRemoteSystemConnection)(windows_core::Interface::as_raw(this), &mut result__).map(|| result__)
}
}
pub fn CheckCallerForCapabilityAsync(&self, capabilityname: &windows_core::HSTRING) -> windows_core::Result<windows_async::IAsyncOperation<bool>> {
pub fn CheckCallerForCapabilityAsync(&self, capabilityname: &windows_core::HSTRING) -> windows_core::Result<windows_future::IAsyncOperation<bool>> {
let this = &windows_core::Interface::cast::<IAppServiceTriggerDetails3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
Expand Down
Loading

0 comments on commit 3174af0

Please sign in to comment.