initial commit of swift-windowsappsdk bindings
This commit is contained in:
parent
534768d80a
commit
30f8c569b9
4
.gitignore
vendored
4
.gitignore
vendored
@ -88,3 +88,7 @@ fastlane/test_output
|
||||
# https://github.com/johnno1962/injectionforxcode
|
||||
|
||||
iOSInjectionProject/
|
||||
|
||||
.packages
|
||||
.generated
|
||||
swift-winrt.rsp
|
||||
11
.vscode/tasks.json
vendored
Normal file
11
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Generate swift-windowsappsdk bindings",
|
||||
"command": "${workspaceFolder:swift-windowsappsdk}/generate-bindings.ps1",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
42
LICENSE
42
LICENSE
@ -1,21 +1,29 @@
|
||||
MIT License
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2024 The Browser Company
|
||||
Copyright (c) 2024, The Browser Company
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
28
Package.swift
Normal file
28
Package.swift
Normal file
@ -0,0 +1,28 @@
|
||||
// swift-tools-version: 5.10
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "swift-windowsappsdk",
|
||||
products: [
|
||||
.library(name: "WinAppSDK", type: .dynamic, targets: ["WinAppSDK"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/thebrowsercompany/swift-cwinrt", branch: "main"),
|
||||
.package(url: "https://github.com/thebrowsercompany/swift-uwp", branch: "main"),
|
||||
.package(url: "https://github.com/thebrowsercompany/swift-windowsfoundation", branch: "main"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "WinAppSDK",
|
||||
dependencies: [
|
||||
.product(name: "CWinRT", package: "swift-cwinrt"),
|
||||
.product(name: "UWP", package: "swift-uwp"),
|
||||
.product(name: "WindowsFoundation", package: "swift-windowsfoundation"),
|
||||
],
|
||||
resources: [
|
||||
.copy("NativeBinaries")
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
28
README.md
Normal file
28
README.md
Normal file
@ -0,0 +1,28 @@
|
||||
# swift-windowsappsdk
|
||||
Swift Language Bindings for the Windows App SDK APIs
|
||||
|
||||
These APIs are intendened to be used in conjuction with the following projects:
|
||||
- [swift-winui](https://github.com/thebrowsercompany/swift-winui)
|
||||
- [swift-win2d](https://github.com/thebrowsercompany/swift-win2d)
|
||||
|
||||
## APIs
|
||||
These projections contains a subset of APIs for the Windows App SDK, minus those of WinUI (`Microsoft.UI.Xaml`). See official documentation for more information on these components:
|
||||
|
||||
- [API Docs](https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/)
|
||||
- [Official GitHub repo](https://github.com/microsoft/WindowsAppSDK)
|
||||
|
||||
### SDK Versions
|
||||
|
||||
1. Windows SDK: `10.0.18362.0`
|
||||
2. Windows App SDK: `1.5-preview1`
|
||||
|
||||
## Project Configuration
|
||||
The bindings are generated from WinMD files, found in NuGet packages on Nuget.org. There are three key files which drive this:
|
||||
1. packages.config - this specifies the packages and their versions
|
||||
2. projections.json - this specifies the project/package and which apis to include in the projection
|
||||
3. generate-bindings.ps1 - this file reads both `packages.config` and `projections.json` and generates the appropriate bindings.
|
||||
|
||||
## Known Issues and Limitations
|
||||
- The developer experience for consuming WinRT APIs from Swift is a work in progress. Due to current limitations, not all APIs can be generated as this causes export limit issues.
|
||||
|
||||
- The APIs listed in projections.json are required for the other `swift-*` projects to build. Modify a projections.json in any one of those projects could require an update here.
|
||||
8
Sources/WinAppSDK/Microsoft.Graphics.DirectX+ABI.swift
Normal file
8
Sources/WinAppSDK/Microsoft.Graphics.DirectX+ABI.swift
Normal file
@ -0,0 +1,8 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __ABI_Microsoft_Graphics_DirectX {
|
||||
}
|
||||
8
Sources/WinAppSDK/Microsoft.Graphics.DirectX+Impl.swift
Normal file
8
Sources/WinAppSDK/Microsoft.Graphics.DirectX+Impl.swift
Normal file
@ -0,0 +1,8 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_Graphics_DirectX {
|
||||
}
|
||||
396
Sources/WinAppSDK/Microsoft.Graphics.DirectX.swift
Normal file
396
Sources/WinAppSDK/Microsoft.Graphics.DirectX.swift
Normal file
@ -0,0 +1,396 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.graphics.directx.directxalphamode)
|
||||
public typealias DirectXAlphaMode = __x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXAlphaMode
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.graphics.directx.directxpixelformat)
|
||||
public typealias DirectXPixelFormat = __x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat
|
||||
extension WinAppSDK.DirectXAlphaMode {
|
||||
public static var unspecified : WinAppSDK.DirectXAlphaMode {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXAlphaMode_Unspecified
|
||||
}
|
||||
public static var premultiplied : WinAppSDK.DirectXAlphaMode {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXAlphaMode_Premultiplied
|
||||
}
|
||||
public static var straight : WinAppSDK.DirectXAlphaMode {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXAlphaMode_Straight
|
||||
}
|
||||
public static var ignore : WinAppSDK.DirectXAlphaMode {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXAlphaMode_Ignore
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.DirectXAlphaMode: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
extension WinAppSDK.DirectXPixelFormat {
|
||||
public static var unknown : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Unknown
|
||||
}
|
||||
public static var r32g32b32a32Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32A32Typeless
|
||||
}
|
||||
public static var r32g32b32a32Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32A32Float
|
||||
}
|
||||
public static var r32g32b32a32uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32A32UInt
|
||||
}
|
||||
public static var r32g32b32a32Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32A32Int
|
||||
}
|
||||
public static var r32g32b32Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32Typeless
|
||||
}
|
||||
public static var r32g32b32Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32Float
|
||||
}
|
||||
public static var r32g32b32uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32UInt
|
||||
}
|
||||
public static var r32g32b32Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32B32Int
|
||||
}
|
||||
public static var r16g16b16a16Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16B16A16Typeless
|
||||
}
|
||||
public static var r16g16b16a16Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16B16A16Float
|
||||
}
|
||||
public static var r16g16b16a16uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16B16A16UIntNormalized
|
||||
}
|
||||
public static var r16g16b16a16uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16B16A16UInt
|
||||
}
|
||||
public static var r16g16b16a16IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16B16A16IntNormalized
|
||||
}
|
||||
public static var r16g16b16a16Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16B16A16Int
|
||||
}
|
||||
public static var r32g32Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32Typeless
|
||||
}
|
||||
public static var r32g32Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32Float
|
||||
}
|
||||
public static var r32g32uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32UInt
|
||||
}
|
||||
public static var r32g32Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G32Int
|
||||
}
|
||||
public static var r32g8x24Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32G8X24Typeless
|
||||
}
|
||||
public static var d32FloatS8X24UInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_D32FloatS8X24UInt
|
||||
}
|
||||
public static var r32FloatX8X24Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32FloatX8X24Typeless
|
||||
}
|
||||
public static var x32TypelessG8X24UInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_X32TypelessG8X24UInt
|
||||
}
|
||||
public static var r10g10b10a2Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R10G10B10A2Typeless
|
||||
}
|
||||
public static var r10g10b10a2uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R10G10B10A2UIntNormalized
|
||||
}
|
||||
public static var r10g10b10a2uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R10G10B10A2UInt
|
||||
}
|
||||
public static var r11g11b10Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R11G11B10Float
|
||||
}
|
||||
public static var r8g8b8a8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8A8Typeless
|
||||
}
|
||||
public static var r8g8b8a8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8A8UIntNormalized
|
||||
}
|
||||
public static var r8g8b8a8uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8A8UIntNormalizedSrgb
|
||||
}
|
||||
public static var r8g8b8a8uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8A8UInt
|
||||
}
|
||||
public static var r8g8b8a8IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8A8IntNormalized
|
||||
}
|
||||
public static var r8g8b8a8Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8A8Int
|
||||
}
|
||||
public static var r16g16Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16Typeless
|
||||
}
|
||||
public static var r16g16Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16Float
|
||||
}
|
||||
public static var r16g16uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16UIntNormalized
|
||||
}
|
||||
public static var r16g16uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16UInt
|
||||
}
|
||||
public static var r16g16IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16IntNormalized
|
||||
}
|
||||
public static var r16g16Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16G16Int
|
||||
}
|
||||
public static var r32Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32Typeless
|
||||
}
|
||||
public static var d32Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_D32Float
|
||||
}
|
||||
public static var r32Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32Float
|
||||
}
|
||||
public static var r32uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32UInt
|
||||
}
|
||||
public static var r32Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R32Int
|
||||
}
|
||||
public static var r24g8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R24G8Typeless
|
||||
}
|
||||
public static var d24uIntNormalizedS8UInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_D24UIntNormalizedS8UInt
|
||||
}
|
||||
public static var r24uIntNormalizedX8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R24UIntNormalizedX8Typeless
|
||||
}
|
||||
public static var x24TypelessG8UInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_X24TypelessG8UInt
|
||||
}
|
||||
public static var r8g8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8Typeless
|
||||
}
|
||||
public static var r8g8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8UIntNormalized
|
||||
}
|
||||
public static var r8g8uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8UInt
|
||||
}
|
||||
public static var r8g8IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8IntNormalized
|
||||
}
|
||||
public static var r8g8Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8Int
|
||||
}
|
||||
public static var r16Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16Typeless
|
||||
}
|
||||
public static var r16Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16Float
|
||||
}
|
||||
public static var d16uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_D16UIntNormalized
|
||||
}
|
||||
public static var r16uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16UIntNormalized
|
||||
}
|
||||
public static var r16uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16UInt
|
||||
}
|
||||
public static var r16IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16IntNormalized
|
||||
}
|
||||
public static var r16Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R16Int
|
||||
}
|
||||
public static var r8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8Typeless
|
||||
}
|
||||
public static var r8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8UIntNormalized
|
||||
}
|
||||
public static var r8uInt : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8UInt
|
||||
}
|
||||
public static var r8IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8IntNormalized
|
||||
}
|
||||
public static var r8Int : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8Int
|
||||
}
|
||||
public static var a8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_A8UIntNormalized
|
||||
}
|
||||
public static var r1uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R1UIntNormalized
|
||||
}
|
||||
public static var r9g9b9e5SharedExponent : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R9G9B9E5SharedExponent
|
||||
}
|
||||
public static var r8g8b8g8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R8G8B8G8UIntNormalized
|
||||
}
|
||||
public static var g8r8g8b8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_G8R8G8B8UIntNormalized
|
||||
}
|
||||
public static var bc1Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC1Typeless
|
||||
}
|
||||
public static var bc1uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC1UIntNormalized
|
||||
}
|
||||
public static var bc1uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC1UIntNormalizedSrgb
|
||||
}
|
||||
public static var bc2Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC2Typeless
|
||||
}
|
||||
public static var bc2uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC2UIntNormalized
|
||||
}
|
||||
public static var bc2uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC2UIntNormalizedSrgb
|
||||
}
|
||||
public static var bc3Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC3Typeless
|
||||
}
|
||||
public static var bc3uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC3UIntNormalized
|
||||
}
|
||||
public static var bc3uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC3UIntNormalizedSrgb
|
||||
}
|
||||
public static var bc4Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC4Typeless
|
||||
}
|
||||
public static var bc4uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC4UIntNormalized
|
||||
}
|
||||
public static var bc4IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC4IntNormalized
|
||||
}
|
||||
public static var bc5Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC5Typeless
|
||||
}
|
||||
public static var bc5uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC5UIntNormalized
|
||||
}
|
||||
public static var bc5IntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC5IntNormalized
|
||||
}
|
||||
public static var b5g6r5uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B5G6R5UIntNormalized
|
||||
}
|
||||
public static var b5g5r5a1uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B5G5R5A1UIntNormalized
|
||||
}
|
||||
public static var b8g8r8a8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B8G8R8A8UIntNormalized
|
||||
}
|
||||
public static var b8g8r8x8uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B8G8R8X8UIntNormalized
|
||||
}
|
||||
public static var r10g10b10xrBiasA2UIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_R10G10B10XRBiasA2UIntNormalized
|
||||
}
|
||||
public static var b8g8r8a8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B8G8R8A8Typeless
|
||||
}
|
||||
public static var b8g8r8a8uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B8G8R8A8UIntNormalizedSrgb
|
||||
}
|
||||
public static var b8g8r8x8Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B8G8R8X8Typeless
|
||||
}
|
||||
public static var b8g8r8x8uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B8G8R8X8UIntNormalizedSrgb
|
||||
}
|
||||
public static var bc6hTypeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC6HTypeless
|
||||
}
|
||||
public static var bc6h16UnsignedFloat : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC6H16UnsignedFloat
|
||||
}
|
||||
public static var bc6h16Float : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC6H16Float
|
||||
}
|
||||
public static var bc7Typeless : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC7Typeless
|
||||
}
|
||||
public static var bc7uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC7UIntNormalized
|
||||
}
|
||||
public static var bc7uIntNormalizedSrgb : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_BC7UIntNormalizedSrgb
|
||||
}
|
||||
public static var ayuv : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Ayuv
|
||||
}
|
||||
public static var y410 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Y410
|
||||
}
|
||||
public static var y416 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Y416
|
||||
}
|
||||
public static var nv12 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_NV12
|
||||
}
|
||||
public static var p010 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_P010
|
||||
}
|
||||
public static var p016 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_P016
|
||||
}
|
||||
public static var opaque420 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Opaque420
|
||||
}
|
||||
public static var yuy2 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Yuy2
|
||||
}
|
||||
public static var y210 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Y210
|
||||
}
|
||||
public static var y216 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_Y216
|
||||
}
|
||||
public static var nv11 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_NV11
|
||||
}
|
||||
public static var ai44 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_AI44
|
||||
}
|
||||
public static var ia44 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_IA44
|
||||
}
|
||||
public static var p8 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_P8
|
||||
}
|
||||
public static var a8p8 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_A8P8
|
||||
}
|
||||
public static var b4g4r4a4uIntNormalized : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_B4G4R4A4UIntNormalized
|
||||
}
|
||||
public static var p208 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_P208
|
||||
}
|
||||
public static var v208 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_V208
|
||||
}
|
||||
public static var v408 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_V408
|
||||
}
|
||||
public static var samplerFeedbackMinMipOpaque : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_SamplerFeedbackMinMipOpaque
|
||||
}
|
||||
public static var samplerFeedbackMipRegionUsedOpaque : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_SamplerFeedbackMipRegionUsedOpaque
|
||||
}
|
||||
public static var a4b4g4r4 : WinAppSDK.DirectXPixelFormat {
|
||||
__x_ABI_CMicrosoft_CGraphics_CDirectX_CDirectXPixelFormat_A4B4G4R4
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.DirectXPixelFormat: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
176
Sources/WinAppSDK/Microsoft.UI+ABI.swift
Normal file
176
Sources/WinAppSDK/Microsoft.UI+ABI.swift
Normal file
@ -0,0 +1,176 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CIClosableNotifier: WindowsFoundation.IID {
|
||||
.init(Data1: 0x2989E93B, Data2: 0xED0F, Data3: 0x5E79, Data4: ( 0x90,0xF2,0xEA,0xC5,0x92,0xFC,0x6E,0x6A ))// 2989E93B-ED0F-5E79-90F2-EAC592FC6E6A
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CIClosableNotifierHandler: WindowsFoundation.IID {
|
||||
.init(Data1: 0x478CEC68, Data2: 0xEA8E, Data3: 0x52FC, Data4: ( 0x87,0xE2,0xC8,0x19,0xDE,0x00,0x0F,0x92 ))// 478CEC68-EA8E-52FC-87E2-C819DE000F92
|
||||
}
|
||||
|
||||
public enum __ABI_Microsoft_UI {
|
||||
public class IClosableNotifier: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CIClosableNotifier }
|
||||
|
||||
open func get_IsClosedImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CIClosableNotifier.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsClosed(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
open func add_ClosedImpl(_ handler: WinAppSDK.ClosableNotifierHandler?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = __ABI_Microsoft_UI.ClosableNotifierHandlerWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CIClosableNotifier.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_Closed(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
open func remove_ClosedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CIClosableNotifier.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Closed(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
open func add_FrameworkClosedImpl(_ handler: WinAppSDK.ClosableNotifierHandler?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = __ABI_Microsoft_UI.ClosableNotifierHandlerWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CIClosableNotifier.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_FrameworkClosed(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
open func remove_FrameworkClosedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CIClosableNotifier.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_FrameworkClosed(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static var IClosableNotifierVTable: __x_ABI_CMicrosoft_CUI_CIClosableNotifierVtbl = .init(
|
||||
QueryInterface: { IClosableNotifierWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { IClosableNotifierWrapper.addRef($0) },
|
||||
Release: { IClosableNotifierWrapper.release($0) },
|
||||
GetIids: {
|
||||
let size = MemoryLayout<WindowsFoundation.IID>.size
|
||||
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
||||
iids[0] = IUnknown.IID
|
||||
iids[1] = IInspectable.IID
|
||||
iids[2] = __ABI_Microsoft_UI.IClosableNotifierWrapper.IID
|
||||
$1!.pointee = 3
|
||||
$2!.pointee = iids
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetRuntimeClassName: {
|
||||
_ = $0
|
||||
let hstring = try! HString("Microsoft.UI.IClosableNotifier").detach()
|
||||
$1!.pointee = hstring
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetTrustLevel: {
|
||||
_ = $0
|
||||
$1!.pointee = TrustLevel(rawValue: 0)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_IsClosed: {
|
||||
guard let __unwrapped__instance = IClosableNotifierWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.isClosed
|
||||
$1?.initialize(to: .init(from: value))
|
||||
return S_OK
|
||||
},
|
||||
|
||||
add_Closed: {
|
||||
guard let __unwrapped__instance = IClosableNotifierWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
guard let handler = __ABI_Microsoft_UI.ClosableNotifierHandlerWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
||||
let token = __unwrapped__instance.closed.addHandler(handler)
|
||||
$2?.initialize(to: .from(swift: token))
|
||||
return S_OK
|
||||
},
|
||||
|
||||
remove_Closed: {
|
||||
guard let __unwrapped__instance = IClosableNotifierWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let token: EventRegistrationToken = $1
|
||||
__unwrapped__instance.closed.removeHandler(token)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
add_FrameworkClosed: {
|
||||
guard let __unwrapped__instance = IClosableNotifierWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
guard let handler = __ABI_Microsoft_UI.ClosableNotifierHandlerWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
||||
let token = __unwrapped__instance.frameworkClosed.addHandler(handler)
|
||||
$2?.initialize(to: .from(swift: token))
|
||||
return S_OK
|
||||
},
|
||||
|
||||
remove_FrameworkClosed: {
|
||||
guard let __unwrapped__instance = IClosableNotifierWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let token: EventRegistrationToken = $1
|
||||
__unwrapped__instance.frameworkClosed.removeHandler(token)
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
|
||||
public typealias IClosableNotifierWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI.IClosableNotifierBridge>
|
||||
}
|
||||
extension __x_ABI_CMicrosoft_CUI_CDisplayId {
|
||||
public static func from(swift: WinAppSDK.DisplayId) -> __x_ABI_CMicrosoft_CUI_CDisplayId {
|
||||
.init(Value: swift.value)
|
||||
}
|
||||
}
|
||||
extension __x_ABI_CMicrosoft_CUI_CIconId {
|
||||
public static func from(swift: WinAppSDK.IconId) -> __x_ABI_CMicrosoft_CUI_CIconId {
|
||||
.init(Value: swift.value)
|
||||
}
|
||||
}
|
||||
extension __x_ABI_CMicrosoft_CUI_CWindowId {
|
||||
public static func from(swift: WinAppSDK.WindowId) -> __x_ABI_CMicrosoft_CUI_CWindowId {
|
||||
.init(Value: swift.value)
|
||||
}
|
||||
}
|
||||
// MARK - ClosableNotifierHandler
|
||||
extension __ABI_Microsoft_UI {
|
||||
public class ClosableNotifierHandler: WindowsFoundation.IUnknown {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CIClosableNotifierHandler }
|
||||
|
||||
open func InvokeImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CIClosableNotifierHandler.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
typealias ClosableNotifierHandlerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI.ClosableNotifierHandlerBridge>
|
||||
internal static var ClosableNotifierHandlerVTable: __x_ABI_CMicrosoft_CUI_CIClosableNotifierHandlerVtbl = .init(
|
||||
QueryInterface: { ClosableNotifierHandlerWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { ClosableNotifierHandlerWrapper.addRef($0) },
|
||||
Release: { ClosableNotifierHandlerWrapper.release($0) },
|
||||
Invoke: {
|
||||
guard let __unwrapped__instance = ClosableNotifierHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
__unwrapped__instance()
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
}
|
||||
public extension WinRTDelegateBridge where CABI == __x_ABI_CMicrosoft_CUI_CIClosableNotifierHandler {
|
||||
static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI.ClosableNotifierHandlerVTable) { $0 }
|
||||
return .init(lpVtbl:vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
78
Sources/WinAppSDK/Microsoft.UI+Impl.swift
Normal file
78
Sources/WinAppSDK/Microsoft.UI+Impl.swift
Normal file
@ -0,0 +1,78 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI {
|
||||
public enum IClosableNotifierBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CIClosableNotifier
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI.IClosableNotifier
|
||||
public typealias SwiftProjection = AnyIClosableNotifier
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IClosableNotifierImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI.IClosableNotifierVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IClosableNotifierImpl: IClosableNotifier, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IClosableNotifierBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier.isclosed)
|
||||
fileprivate var isClosed : Bool {
|
||||
get { try! _default.get_IsClosedImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier.closed)
|
||||
fileprivate lazy var closed : Event<ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_ClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_ClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier.frameworkclosed)
|
||||
fileprivate lazy var frameworkClosed : Event<ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_FrameworkClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_FrameworkClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
public class ClosableNotifierHandlerBridge : WinRTDelegateBridge {
|
||||
public typealias Handler = ClosableNotifierHandler
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CIClosableNotifierHandler
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI.ClosableNotifierHandler
|
||||
|
||||
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
||||
guard let abi = abi else { return nil }
|
||||
let _default = SwiftABI(abi)
|
||||
let handler: Handler = { () in
|
||||
try! _default.InvokeImpl()
|
||||
}
|
||||
return handler
|
||||
}
|
||||
}
|
||||
}
|
||||
7121
Sources/WinAppSDK/Microsoft.UI.Composition+ABI.swift
Normal file
7121
Sources/WinAppSDK/Microsoft.UI.Composition+ABI.swift
Normal file
File diff suppressed because it is too large
Load Diff
205
Sources/WinAppSDK/Microsoft.UI.Composition+Impl.swift
Normal file
205
Sources/WinAppSDK/Microsoft.UI.Composition+Impl.swift
Normal file
@ -0,0 +1,205 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Composition {
|
||||
public enum IAnimationObjectBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CIAnimationObject
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.IAnimationObject
|
||||
public typealias SwiftProjection = AnyIAnimationObject
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IAnimationObjectImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.IAnimationObjectVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IAnimationObjectImpl: IAnimationObject, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IAnimationObjectBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.ianimationobject.populatepropertyinfo)
|
||||
fileprivate func populatePropertyInfo(_ propertyName: String, _ propertyInfo: AnimationPropertyInfo!) throws {
|
||||
try _default.PopulatePropertyInfoImpl(propertyName, propertyInfo)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ICompositionAnimationBaseBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CICompositionAnimationBase
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.ICompositionAnimationBase
|
||||
public typealias SwiftProjection = AnyICompositionAnimationBase
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ICompositionAnimationBaseImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.ICompositionAnimationBaseVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ICompositionAnimationBaseImpl: ICompositionAnimationBase, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ICompositionAnimationBaseBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ICompositionSupportsSystemBackdropBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CICompositionSupportsSystemBackdrop
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdrop
|
||||
public typealias SwiftProjection = AnyICompositionSupportsSystemBackdrop
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ICompositionSupportsSystemBackdropImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdropVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ICompositionSupportsSystemBackdropImpl: ICompositionSupportsSystemBackdrop, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ICompositionSupportsSystemBackdropBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.icompositionsupportssystembackdrop.systembackdrop)
|
||||
fileprivate var systemBackdrop : UWP.CompositionBrush! {
|
||||
get { try! _default.get_SystemBackdropImpl() }
|
||||
set { try! _default.put_SystemBackdropImpl(newValue) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ICompositionSurfaceBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CICompositionSurface
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.ICompositionSurface
|
||||
public typealias SwiftProjection = AnyICompositionSurface
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ICompositionSurfaceImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.ICompositionSurfaceVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ICompositionSurfaceImpl: ICompositionSurface, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ICompositionSurfaceBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ICompositionSurfaceFacadeBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CICompositionSurfaceFacade
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.ICompositionSurfaceFacade
|
||||
public typealias SwiftProjection = AnyICompositionSurfaceFacade
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ICompositionSurfaceFacadeImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.ICompositionSurfaceFacadeVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ICompositionSurfaceFacadeImpl: ICompositionSurfaceFacade, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ICompositionSurfaceFacadeBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.icompositionsurfacefacade.getrealsurface)
|
||||
fileprivate func getRealSurface() throws -> AnyICompositionSurface! {
|
||||
try _default.GetRealSurfaceImpl()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum IVisualElementBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CIVisualElement
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.IVisualElement
|
||||
public typealias SwiftProjection = AnyIVisualElement
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IVisualElementImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.IVisualElementVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IVisualElementImpl: IVisualElement, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IVisualElementBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum IVisualElement2Bridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CIVisualElement2
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition.IVisualElement2
|
||||
public typealias SwiftProjection = AnyIVisualElement2
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IVisualElement2Impl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition.IVisualElement2VTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IVisualElement2Impl: IVisualElement2, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IVisualElement2Bridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.ivisualelement2.getvisualinternal)
|
||||
fileprivate func getVisualInternal() throws -> Visual! {
|
||||
try _default.GetVisualInternalImpl()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1567
Sources/WinAppSDK/Microsoft.UI.Composition.Interactions+ABI.swift
Normal file
1567
Sources/WinAppSDK/Microsoft.UI.Composition.Interactions+ABI.swift
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,88 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Composition_Interactions {
|
||||
public enum ICompositionInteractionSourceBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CInteractions_CICompositionInteractionSource
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition_Interactions.ICompositionInteractionSource
|
||||
public typealias SwiftProjection = AnyICompositionInteractionSource
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ICompositionInteractionSourceImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition_Interactions.ICompositionInteractionSourceVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ICompositionInteractionSourceImpl: ICompositionInteractionSource, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ICompositionInteractionSourceBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum IInteractionTrackerOwnerBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CInteractions_CIInteractionTrackerOwner
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition_Interactions.IInteractionTrackerOwner
|
||||
public typealias SwiftProjection = AnyIInteractionTrackerOwner
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IInteractionTrackerOwnerImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition_Interactions.IInteractionTrackerOwnerVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IInteractionTrackerOwnerImpl: IInteractionTrackerOwner, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IInteractionTrackerOwnerBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.interactions.iinteractiontrackerowner.customanimationstateentered)
|
||||
fileprivate func customAnimationStateEntered(_ sender: InteractionTracker!, _ args: InteractionTrackerCustomAnimationStateEnteredArgs!) throws {
|
||||
try _default.CustomAnimationStateEnteredImpl(sender, args)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.interactions.iinteractiontrackerowner.idlestateentered)
|
||||
fileprivate func idleStateEntered(_ sender: InteractionTracker!, _ args: InteractionTrackerIdleStateEnteredArgs!) throws {
|
||||
try _default.IdleStateEnteredImpl(sender, args)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.interactions.iinteractiontrackerowner.inertiastateentered)
|
||||
fileprivate func inertiaStateEntered(_ sender: InteractionTracker!, _ args: InteractionTrackerInertiaStateEnteredArgs!) throws {
|
||||
try _default.InertiaStateEnteredImpl(sender, args)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.interactions.iinteractiontrackerowner.interactingstateentered)
|
||||
fileprivate func interactingStateEntered(_ sender: InteractionTracker!, _ args: InteractionTrackerInteractingStateEnteredArgs!) throws {
|
||||
try _default.InteractingStateEnteredImpl(sender, args)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.interactions.iinteractiontrackerowner.requestignored)
|
||||
fileprivate func requestIgnored(_ sender: InteractionTracker!, _ args: InteractionTrackerRequestIgnoredArgs!) throws {
|
||||
try _default.RequestIgnoredImpl(sender, args)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.interactions.iinteractiontrackerowner.valueschanged)
|
||||
fileprivate func valuesChanged(_ sender: InteractionTracker!, _ args: InteractionTrackerValuesChangedArgs!) throws {
|
||||
try _default.ValuesChangedImpl(sender, args)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1306
Sources/WinAppSDK/Microsoft.UI.Composition.Interactions.swift
Normal file
1306
Sources/WinAppSDK/Microsoft.UI.Composition.Interactions.swift
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,542 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController: WindowsFoundation.IID {
|
||||
.init(Data1: 0x7C20A6AF, Data2: 0x8EB3, Data3: 0x5F08, Data4: ( 0xBD,0xFC,0x6D,0x35,0xE3,0x5D,0xFE,0x45 ))// 7C20A6AF-8EB3-5F08-BDFC-6D35E35DFE45
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController2: WindowsFoundation.IID {
|
||||
.init(Data1: 0x88E0A368, Data2: 0xDFC7, Data3: 0x5971, Data4: ( 0xA5,0x0B,0x40,0xDF,0x5A,0xA5,0xF5,0xC2 ))// 88E0A368-DFC7-5971-A50B-40DF5AA5F5C2
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController3: WindowsFoundation.IID {
|
||||
.init(Data1: 0x30D917E6, Data2: 0x02D3, Data3: 0x59CA, Data4: ( 0xB4,0x40,0xBF,0x9D,0x2E,0x7C,0xC1,0x40 ))// 30D917E6-02D3-59CA-B440-BF9D2E7CC140
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicControllerStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0xA9E8F790, Data2: 0x79EF, Data3: 0x5416, Data4: ( 0x9B,0x67,0x6B,0xCF,0xE8,0x67,0xC8,0xB7 ))// A9E8F790-79EF-5416-9B67-6BCFE867C8B7
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController: WindowsFoundation.IID {
|
||||
.init(Data1: 0x2DE996A9, Data2: 0x0A2A, Data3: 0x5889, Data4: ( 0xA8,0x9C,0x1F,0x84,0x06,0x0A,0x8C,0xAB ))// 2DE996A9-0A2A-5889-A89C-1F84060A8CAB
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController2: WindowsFoundation.IID {
|
||||
.init(Data1: 0xF1ED4A52, Data2: 0xD9CA, Data3: 0x506E, Data4: ( 0x95,0x86,0xCA,0xAE,0xFD,0x3A,0xA9,0x71 ))// F1ED4A52-D9CA-506E-9586-CAAEFD3AA971
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaControllerStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0x7D85D834, Data2: 0xD514, Data3: 0x5250, Data4: ( 0xB7,0xC4,0x0B,0x78,0x50,0xD1,0xEF,0xDC ))// 7D85D834-D514-5250-B7C4-0B7850D1EFDC
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration: WindowsFoundation.IID {
|
||||
.init(Data1: 0xEBCCE1B9, Data2: 0x0E0C, Data3: 0x5431, Data4: ( 0xAB,0x0E,0x00,0xF3,0xF0,0x66,0x99,0x62 ))// EBCCE1B9-0E0C-5431-AB0E-00F3F0669962
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropController: WindowsFoundation.IID {
|
||||
.init(Data1: 0x5632D76C, Data2: 0x0B74, Data3: 0x5B52, Data4: ( 0xAA,0x33,0x80,0x26,0x20,0x68,0xAE,0xB2 ))// 5632D76C-0B74-5B52-AA33-80262068AEB2
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets: WindowsFoundation.IID {
|
||||
.init(Data1: 0x9C56FE7C, Data2: 0x98EB, Data3: 0x5F89, Data4: ( 0xAD,0x97,0xDA,0xD5,0x7F,0xC3,0x0C,0x8C ))// 9C56FE7C-98EB-5F89-AD97-DAD57FC30C8C
|
||||
}
|
||||
|
||||
public enum __ABI_Microsoft_UI_Composition_SystemBackdrops {
|
||||
public class IDesktopAcrylicController: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController }
|
||||
|
||||
internal func get_FallbackColorImpl() throws -> UWP.Color {
|
||||
var value: __x_ABI_CWindows_CUI_CColor = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_FallbackColor(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func put_FallbackColorImpl(_ value: UWP.Color) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_FallbackColor(pThis, .from(swift: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_LuminosityOpacityImpl() throws -> Float {
|
||||
var value: FLOAT = 0.0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_LuminosityOpacity(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_LuminosityOpacityImpl(_ value: Float) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_LuminosityOpacity(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_TintColorImpl() throws -> UWP.Color {
|
||||
var value: __x_ABI_CWindows_CUI_CColor = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_TintColor(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func put_TintColorImpl(_ value: UWP.Color) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_TintColor(pThis, .from(swift: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_TintOpacityImpl() throws -> Float {
|
||||
var value: FLOAT = 0.0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_TintOpacity(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_TintOpacityImpl(_ value: Float) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_TintOpacity(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDesktopAcrylicController2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController2 }
|
||||
|
||||
internal func ResetPropertiesImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ResetProperties(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDesktopAcrylicController3: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController3 }
|
||||
|
||||
internal func get_KindImpl() throws -> WinAppSDK.DesktopAcrylicKind {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CDesktopAcrylicKind = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_KindImpl(_ value: WinAppSDK.DesktopAcrylicKind) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Kind(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDesktopAcrylicControllerStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicControllerStatics }
|
||||
|
||||
internal func IsSupportedImpl() throws -> Bool {
|
||||
var result: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicControllerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.IsSupported(pThis, &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IMicaController: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController }
|
||||
|
||||
internal func get_FallbackColorImpl() throws -> UWP.Color {
|
||||
var value: __x_ABI_CWindows_CUI_CColor = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_FallbackColor(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func put_FallbackColorImpl(_ value: UWP.Color) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_FallbackColor(pThis, .from(swift: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_LuminosityOpacityImpl() throws -> Float {
|
||||
var value: FLOAT = 0.0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_LuminosityOpacity(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_LuminosityOpacityImpl(_ value: Float) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_LuminosityOpacity(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_TintColorImpl() throws -> UWP.Color {
|
||||
var value: __x_ABI_CWindows_CUI_CColor = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_TintColor(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func put_TintColorImpl(_ value: UWP.Color) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_TintColor(pThis, .from(swift: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_TintOpacityImpl() throws -> Float {
|
||||
var value: FLOAT = 0.0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_TintOpacity(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_TintOpacityImpl(_ value: Float) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_TintOpacity(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IMicaController2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController2 }
|
||||
|
||||
internal func get_KindImpl() throws -> WinAppSDK.MicaKind {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CMicaKind = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_KindImpl(_ value: WinAppSDK.MicaKind) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Kind(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
internal func ResetPropertiesImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ResetProperties(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IMicaControllerStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaControllerStatics }
|
||||
|
||||
internal func IsSupportedImpl() throws -> Bool {
|
||||
var result: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaControllerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.IsSupported(pThis, &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ISystemBackdropConfiguration: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration }
|
||||
|
||||
internal func get_HighContrastBackgroundColorImpl() throws -> UWP.Color? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_HighContrastBackgroundColor(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIReference_1___x_ABI_CWindows__CUI__CColorWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
internal func put_HighContrastBackgroundColorImpl(_ value: UWP.Color?) throws {
|
||||
let valueWrapper = WinAppSDK.__x_ABI_C__FIReference_1___x_ABI_CWindows__CUI__CColorWrapper(value)
|
||||
let _value = try! valueWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_HighContrastBackgroundColor(pThis, _value))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_IsHighContrastImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsHighContrast(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_IsHighContrastImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsHighContrast(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_IsInputActiveImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsInputActive(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_IsInputActiveImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsInputActive(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_ThemeImpl() throws -> WinAppSDK.SystemBackdropTheme {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropTheme = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Theme(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func put_ThemeImpl(_ value: WinAppSDK.SystemBackdropTheme) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Theme(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ISystemBackdropController: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropController }
|
||||
|
||||
open func SetTargetWithWindowIdImpl(_ windowId: WinAppSDK.WindowId, _ desktopWindowTarget: UWP.CompositionTarget?) throws -> Bool {
|
||||
var result: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.SetTargetWithWindowId(pThis, .from(swift: windowId), RawPointer(desktopWindowTarget), &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
open func SetTargetWithCoreWindowImpl(_ coreWindow: UWP.CoreWindow?, _ compositionTarget: UWP.CompositionTarget?) throws -> Bool {
|
||||
var result: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.SetTargetWithCoreWindow(pThis, RawPointer(coreWindow), RawPointer(compositionTarget), &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static var ISystemBackdropControllerVTable: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerVtbl = .init(
|
||||
QueryInterface: { ISystemBackdropControllerWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { ISystemBackdropControllerWrapper.addRef($0) },
|
||||
Release: { ISystemBackdropControllerWrapper.release($0) },
|
||||
GetIids: {
|
||||
let size = MemoryLayout<WindowsFoundation.IID>.size
|
||||
let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
||||
iids[0] = IUnknown.IID
|
||||
iids[1] = IInspectable.IID
|
||||
iids[2] = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWrapper.IID
|
||||
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
|
||||
$1!.pointee = 4
|
||||
$2!.pointee = iids
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetRuntimeClassName: {
|
||||
_ = $0
|
||||
let hstring = try! HString("Microsoft.UI.Composition.SystemBackdrops.ISystemBackdropController").detach()
|
||||
$1!.pointee = hstring
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetTrustLevel: {
|
||||
_ = $0
|
||||
$1!.pointee = TrustLevel(rawValue: 0)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
SetTargetWithWindowId: {
|
||||
do {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let windowId: WinAppSDK.WindowId = .from(abi: $1)
|
||||
let desktopWindowTarget: UWP.CompositionTarget? = .from(abi: ComPtr($2))
|
||||
let result = try __unwrapped__instance.setTarget(windowId, desktopWindowTarget)
|
||||
$3?.initialize(to: .init(from: result))
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
},
|
||||
|
||||
SetTargetWithCoreWindow: {
|
||||
do {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let coreWindow: UWP.CoreWindow? = .from(abi: ComPtr($1))
|
||||
let compositionTarget: UWP.CompositionTarget? = .from(abi: ComPtr($2))
|
||||
let result = try __unwrapped__instance.setTarget(coreWindow, compositionTarget)
|
||||
$3?.initialize(to: .init(from: result))
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
}
|
||||
)
|
||||
|
||||
public typealias ISystemBackdropControllerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerBridge>
|
||||
public class ISystemBackdropControllerWithTargets: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets }
|
||||
|
||||
open func get_StateImpl() throws -> WinAppSDK.SystemBackdropState {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropState = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_State(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
open func AddSystemBackdropTargetImpl(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop?) throws -> Bool {
|
||||
var result: boolean = 0
|
||||
let systemBackdropTargetWrapper = __ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdropWrapper(systemBackdropTarget)
|
||||
let _systemBackdropTarget = try! systemBackdropTargetWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.AddSystemBackdropTarget(pThis, _systemBackdropTarget, &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
open func RemoveAllSystemBackdropTargetsImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveAllSystemBackdropTargets(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
open func RemoveSystemBackdropTargetImpl(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop?) throws -> Bool {
|
||||
var result: boolean = 0
|
||||
let systemBackdropTargetWrapper = __ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdropWrapper(systemBackdropTarget)
|
||||
let _systemBackdropTarget = try! systemBackdropTargetWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RemoveSystemBackdropTarget(pThis, _systemBackdropTarget, &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
open func SetSystemBackdropConfigurationImpl(_ configuration: WinAppSDK.SystemBackdropConfiguration?) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.SetSystemBackdropConfiguration(pThis, RawPointer(configuration)))
|
||||
}
|
||||
}
|
||||
|
||||
open func add_StateChangedImpl(_ handler: TypedEventHandler<WinAppSDK.AnyISystemBackdropControllerWithTargets?, Any?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CComposition__CSystemBackdrops__CISystemBackdropControllerWithTargets_IInspectableWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_StateChanged(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
open func remove_StateChangedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_StateChanged(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static var ISystemBackdropControllerWithTargetsVTable: __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargetsVtbl = .init(
|
||||
QueryInterface: { ISystemBackdropControllerWithTargetsWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { ISystemBackdropControllerWithTargetsWrapper.addRef($0) },
|
||||
Release: { ISystemBackdropControllerWithTargetsWrapper.release($0) },
|
||||
GetIids: {
|
||||
let size = MemoryLayout<WindowsFoundation.IID>.size
|
||||
let iids = CoTaskMemAlloc(UInt64(size) * 5).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
||||
iids[0] = IUnknown.IID
|
||||
iids[1] = IInspectable.IID
|
||||
iids[2] = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargetsWrapper.IID
|
||||
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
|
||||
iids[4] = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWrapper.IID
|
||||
$1!.pointee = 5
|
||||
$2!.pointee = iids
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetRuntimeClassName: {
|
||||
_ = $0
|
||||
let hstring = try! HString("Microsoft.UI.Composition.SystemBackdrops.ISystemBackdropControllerWithTargets").detach()
|
||||
$1!.pointee = hstring
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetTrustLevel: {
|
||||
_ = $0
|
||||
$1!.pointee = TrustLevel(rawValue: 0)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_State: {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.state
|
||||
$1?.initialize(to: value)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
AddSystemBackdropTarget: {
|
||||
do {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop? = __ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdropWrapper.unwrapFrom(abi: ComPtr($1))
|
||||
let result = try __unwrapped__instance.addSystemBackdropTarget(systemBackdropTarget)
|
||||
$2?.initialize(to: .init(from: result))
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
},
|
||||
|
||||
RemoveAllSystemBackdropTargets: {
|
||||
do {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
try __unwrapped__instance.removeAllSystemBackdropTargets()
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
},
|
||||
|
||||
RemoveSystemBackdropTarget: {
|
||||
do {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop? = __ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdropWrapper.unwrapFrom(abi: ComPtr($1))
|
||||
let result = try __unwrapped__instance.removeSystemBackdropTarget(systemBackdropTarget)
|
||||
$2?.initialize(to: .init(from: result))
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
},
|
||||
|
||||
SetSystemBackdropConfiguration: {
|
||||
do {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let configuration: WinAppSDK.SystemBackdropConfiguration? = .from(abi: ComPtr($1))
|
||||
try __unwrapped__instance.setSystemBackdropConfiguration(configuration)
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
},
|
||||
|
||||
add_StateChanged: {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
guard let handler = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CComposition__CSystemBackdrops__CISystemBackdropControllerWithTargets_IInspectableWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
||||
let token = __unwrapped__instance.stateChanged.addHandler(handler)
|
||||
$2?.initialize(to: .from(swift: token))
|
||||
return S_OK
|
||||
},
|
||||
|
||||
remove_StateChanged: {
|
||||
guard let __unwrapped__instance = ISystemBackdropControllerWithTargetsWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let token: EventRegistrationToken = $1
|
||||
__unwrapped__instance.stateChanged.removeHandler(token)
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
|
||||
public typealias ISystemBackdropControllerWithTargetsWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargetsBridge>
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Composition_SystemBackdrops {
|
||||
public enum ISystemBackdropControllerBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropController
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropController
|
||||
public typealias SwiftProjection = AnyISystemBackdropController
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ISystemBackdropControllerImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ISystemBackdropControllerImpl: ISystemBackdropController, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ISystemBackdropControllerBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontroller.settarget)
|
||||
fileprivate func setTarget(_ windowId: WinAppSDK.WindowId, _ desktopWindowTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _default.SetTargetWithWindowIdImpl(windowId, desktopWindowTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontroller.settarget)
|
||||
fileprivate func setTarget(_ coreWindow: UWP.CoreWindow!, _ compositionTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _default.SetTargetWithCoreWindowImpl(coreWindow, compositionTarget)
|
||||
}
|
||||
|
||||
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontroller.close)
|
||||
fileprivate func close() throws {
|
||||
try _IClosable.CloseImpl()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ISystemBackdropControllerWithTargetsBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropControllerWithTargets
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargets
|
||||
public typealias SwiftProjection = AnyISystemBackdropControllerWithTargets
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return ISystemBackdropControllerWithTargetsImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargetsVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class ISystemBackdropControllerWithTargetsImpl: ISystemBackdropControllerWithTargets, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = ISystemBackdropControllerWithTargetsBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.addsystembackdroptarget)
|
||||
fileprivate func addSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool {
|
||||
try _default.AddSystemBackdropTargetImpl(systemBackdropTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.removeallsystembackdroptargets)
|
||||
fileprivate func removeAllSystemBackdropTargets() throws {
|
||||
try _default.RemoveAllSystemBackdropTargetsImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.removesystembackdroptarget)
|
||||
fileprivate func removeSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool {
|
||||
try _default.RemoveSystemBackdropTargetImpl(systemBackdropTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.setsystembackdropconfiguration)
|
||||
fileprivate func setSystemBackdropConfiguration(_ configuration: SystemBackdropConfiguration!) throws {
|
||||
try _default.SetSystemBackdropConfigurationImpl(configuration)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.state)
|
||||
fileprivate var state : SystemBackdropState {
|
||||
get { try! _default.get_StateImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.statechanged)
|
||||
fileprivate lazy var stateChanged : Event<TypedEventHandler<ISystemBackdropControllerWithTargets?, Any?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_StateChangedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_StateChangedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.close)
|
||||
fileprivate func close() throws {
|
||||
try _IClosable.CloseImpl()
|
||||
}
|
||||
|
||||
private lazy var _ISystemBackdropController: __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropController! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.settarget)
|
||||
fileprivate func setTarget(_ windowId: WinAppSDK.WindowId, _ desktopWindowTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _ISystemBackdropController.SetTargetWithWindowIdImpl(windowId, desktopWindowTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.settarget)
|
||||
fileprivate func setTarget(_ coreWindow: UWP.CoreWindow!, _ compositionTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _ISystemBackdropController.SetTargetWithCoreWindowImpl(coreWindow, compositionTarget)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
522
Sources/WinAppSDK/Microsoft.UI.Composition.SystemBackdrops.swift
Normal file
522
Sources/WinAppSDK/Microsoft.UI.Composition.SystemBackdrops.swift
Normal file
@ -0,0 +1,522 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacrylickind)
|
||||
public typealias DesktopAcrylicKind = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CDesktopAcrylicKind
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micakind)
|
||||
public typealias MicaKind = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CMicaKind
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdropstate)
|
||||
public typealias SystemBackdropState = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropState
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdroptheme)
|
||||
public typealias SystemBackdropTheme = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropTheme
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller)
|
||||
public final class DesktopAcrylicController : WinRTClass, WindowsFoundation.IClosable, ISystemBackdropController, ISystemBackdropControllerWithTargets, WinAppSDK.IClosableNotifier {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Composition_SystemBackdrops.IDesktopAcrylicController
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIDesktopAcrylicController>?) -> DesktopAcrylicController? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
override public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
override public init() {
|
||||
super.init(try! RoActivateInstance(HString("Microsoft.UI.Composition.SystemBackdrops.DesktopAcrylicController")))
|
||||
}
|
||||
|
||||
private static let _IDesktopAcrylicControllerStatics: __ABI_Microsoft_UI_Composition_SystemBackdrops.IDesktopAcrylicControllerStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Composition.SystemBackdrops.DesktopAcrylicController"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.issupported)
|
||||
public static func isSupported() -> Bool {
|
||||
return try! _IDesktopAcrylicControllerStatics.IsSupportedImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.fallbackcolor)
|
||||
public var fallbackColor : UWP.Color {
|
||||
get { try! _default.get_FallbackColorImpl() }
|
||||
set { try! _default.put_FallbackColorImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.luminosityopacity)
|
||||
public var luminosityOpacity : Float {
|
||||
get { try! _default.get_LuminosityOpacityImpl() }
|
||||
set { try! _default.put_LuminosityOpacityImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.tintcolor)
|
||||
public var tintColor : UWP.Color {
|
||||
get { try! _default.get_TintColorImpl() }
|
||||
set { try! _default.put_TintColorImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.tintopacity)
|
||||
public var tintOpacity : Float {
|
||||
get { try! _default.get_TintOpacityImpl() }
|
||||
set { try! _default.put_TintOpacityImpl(newValue) }
|
||||
}
|
||||
|
||||
private lazy var _IDesktopAcrylicController2: __ABI_Microsoft_UI_Composition_SystemBackdrops.IDesktopAcrylicController2! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.resetproperties)
|
||||
public func resetProperties() throws {
|
||||
try _IDesktopAcrylicController2.ResetPropertiesImpl()
|
||||
}
|
||||
|
||||
private lazy var _IDesktopAcrylicController3: __ABI_Microsoft_UI_Composition_SystemBackdrops.IDesktopAcrylicController3! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.kind)
|
||||
public var kind : DesktopAcrylicKind {
|
||||
get { try! _IDesktopAcrylicController3.get_KindImpl() }
|
||||
set { try! _IDesktopAcrylicController3.put_KindImpl(newValue) }
|
||||
}
|
||||
|
||||
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.close)
|
||||
public func close() throws {
|
||||
try _IClosable.CloseImpl()
|
||||
}
|
||||
|
||||
private lazy var _ISystemBackdropController: __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropController! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.settarget)
|
||||
public func setTarget(_ windowId: WinAppSDK.WindowId, _ desktopWindowTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _ISystemBackdropController.SetTargetWithWindowIdImpl(windowId, desktopWindowTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.settarget)
|
||||
public func setTarget(_ coreWindow: UWP.CoreWindow!, _ compositionTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _ISystemBackdropController.SetTargetWithCoreWindowImpl(coreWindow, compositionTarget)
|
||||
}
|
||||
|
||||
private lazy var _ISystemBackdropControllerWithTargets: __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargets! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.addsystembackdroptarget)
|
||||
public func addSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool {
|
||||
try _ISystemBackdropControllerWithTargets.AddSystemBackdropTargetImpl(systemBackdropTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.removeallsystembackdroptargets)
|
||||
public func removeAllSystemBackdropTargets() throws {
|
||||
try _ISystemBackdropControllerWithTargets.RemoveAllSystemBackdropTargetsImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.removesystembackdroptarget)
|
||||
public func removeSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool {
|
||||
try _ISystemBackdropControllerWithTargets.RemoveSystemBackdropTargetImpl(systemBackdropTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.setsystembackdropconfiguration)
|
||||
public func setSystemBackdropConfiguration(_ configuration: SystemBackdropConfiguration!) throws {
|
||||
try _ISystemBackdropControllerWithTargets.SetSystemBackdropConfigurationImpl(configuration)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.state)
|
||||
public var state : SystemBackdropState {
|
||||
get { try! _ISystemBackdropControllerWithTargets.get_StateImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.statechanged)
|
||||
public lazy var stateChanged : Event<TypedEventHandler<ISystemBackdropControllerWithTargets?, Any?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._ISystemBackdropControllerWithTargets else { return .init() }
|
||||
return try! this.add_StateChangedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._ISystemBackdropControllerWithTargets.remove_StateChangedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
private lazy var _IClosableNotifier: __ABI_Microsoft_UI.IClosableNotifier! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.isclosed)
|
||||
public var isClosed : Bool {
|
||||
get { try! _IClosableNotifier.get_IsClosedImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.closed)
|
||||
public lazy var closed : Event<WinAppSDK.ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IClosableNotifier else { return .init() }
|
||||
return try! this.add_ClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IClosableNotifier.remove_ClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.desktopacryliccontroller.frameworkclosed)
|
||||
public lazy var frameworkClosed : Event<WinAppSDK.ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IClosableNotifier else { return .init() }
|
||||
return try! this.add_FrameworkClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IClosableNotifier.remove_FrameworkClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
_IDesktopAcrylicController2 = nil
|
||||
_IDesktopAcrylicController3 = nil
|
||||
_IClosable = nil
|
||||
_ISystemBackdropController = nil
|
||||
_ISystemBackdropControllerWithTargets = nil
|
||||
_IClosableNotifier = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller)
|
||||
public final class MicaController : WinRTClass, WindowsFoundation.IClosable, ISystemBackdropController, ISystemBackdropControllerWithTargets, WinAppSDK.IClosableNotifier {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Composition_SystemBackdrops.IMicaController
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CIMicaController>?) -> MicaController? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
override public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
override public init() {
|
||||
super.init(try! RoActivateInstance(HString("Microsoft.UI.Composition.SystemBackdrops.MicaController")))
|
||||
}
|
||||
|
||||
private static let _IMicaControllerStatics: __ABI_Microsoft_UI_Composition_SystemBackdrops.IMicaControllerStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Composition.SystemBackdrops.MicaController"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.issupported)
|
||||
public static func isSupported() -> Bool {
|
||||
return try! _IMicaControllerStatics.IsSupportedImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.fallbackcolor)
|
||||
public var fallbackColor : UWP.Color {
|
||||
get { try! _default.get_FallbackColorImpl() }
|
||||
set { try! _default.put_FallbackColorImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.luminosityopacity)
|
||||
public var luminosityOpacity : Float {
|
||||
get { try! _default.get_LuminosityOpacityImpl() }
|
||||
set { try! _default.put_LuminosityOpacityImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.tintcolor)
|
||||
public var tintColor : UWP.Color {
|
||||
get { try! _default.get_TintColorImpl() }
|
||||
set { try! _default.put_TintColorImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.tintopacity)
|
||||
public var tintOpacity : Float {
|
||||
get { try! _default.get_TintOpacityImpl() }
|
||||
set { try! _default.put_TintOpacityImpl(newValue) }
|
||||
}
|
||||
|
||||
private lazy var _IMicaController2: __ABI_Microsoft_UI_Composition_SystemBackdrops.IMicaController2! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.resetproperties)
|
||||
public func resetProperties() throws {
|
||||
try _IMicaController2.ResetPropertiesImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.kind)
|
||||
public var kind : MicaKind {
|
||||
get { try! _IMicaController2.get_KindImpl() }
|
||||
set { try! _IMicaController2.put_KindImpl(newValue) }
|
||||
}
|
||||
|
||||
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.close)
|
||||
public func close() throws {
|
||||
try _IClosable.CloseImpl()
|
||||
}
|
||||
|
||||
private lazy var _ISystemBackdropController: __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropController! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.settarget)
|
||||
public func setTarget(_ windowId: WinAppSDK.WindowId, _ desktopWindowTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _ISystemBackdropController.SetTargetWithWindowIdImpl(windowId, desktopWindowTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.settarget)
|
||||
public func setTarget(_ coreWindow: UWP.CoreWindow!, _ compositionTarget: UWP.CompositionTarget!) throws -> Bool {
|
||||
try _ISystemBackdropController.SetTargetWithCoreWindowImpl(coreWindow, compositionTarget)
|
||||
}
|
||||
|
||||
private lazy var _ISystemBackdropControllerWithTargets: __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargets! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.addsystembackdroptarget)
|
||||
public func addSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool {
|
||||
try _ISystemBackdropControllerWithTargets.AddSystemBackdropTargetImpl(systemBackdropTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.removeallsystembackdroptargets)
|
||||
public func removeAllSystemBackdropTargets() throws {
|
||||
try _ISystemBackdropControllerWithTargets.RemoveAllSystemBackdropTargetsImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.removesystembackdroptarget)
|
||||
public func removeSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool {
|
||||
try _ISystemBackdropControllerWithTargets.RemoveSystemBackdropTargetImpl(systemBackdropTarget)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.setsystembackdropconfiguration)
|
||||
public func setSystemBackdropConfiguration(_ configuration: SystemBackdropConfiguration!) throws {
|
||||
try _ISystemBackdropControllerWithTargets.SetSystemBackdropConfigurationImpl(configuration)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.state)
|
||||
public var state : SystemBackdropState {
|
||||
get { try! _ISystemBackdropControllerWithTargets.get_StateImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.statechanged)
|
||||
public lazy var stateChanged : Event<TypedEventHandler<ISystemBackdropControllerWithTargets?, Any?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._ISystemBackdropControllerWithTargets else { return .init() }
|
||||
return try! this.add_StateChangedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._ISystemBackdropControllerWithTargets.remove_StateChangedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
private lazy var _IClosableNotifier: __ABI_Microsoft_UI.IClosableNotifier! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.isclosed)
|
||||
public var isClosed : Bool {
|
||||
get { try! _IClosableNotifier.get_IsClosedImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.closed)
|
||||
public lazy var closed : Event<WinAppSDK.ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IClosableNotifier else { return .init() }
|
||||
return try! this.add_ClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IClosableNotifier.remove_ClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.micacontroller.frameworkclosed)
|
||||
public lazy var frameworkClosed : Event<WinAppSDK.ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IClosableNotifier else { return .init() }
|
||||
return try! this.add_FrameworkClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IClosableNotifier.remove_FrameworkClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
_IMicaController2 = nil
|
||||
_IClosable = nil
|
||||
_ISystemBackdropController = nil
|
||||
_ISystemBackdropControllerWithTargets = nil
|
||||
_IClosableNotifier = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdropconfiguration)
|
||||
public final class SystemBackdropConfiguration : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropConfiguration
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CISystemBackdropConfiguration>?) -> SystemBackdropConfiguration? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
override public init() {
|
||||
super.init(try! RoActivateInstance(HString("Microsoft.UI.Composition.SystemBackdrops.SystemBackdropConfiguration")))
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdropconfiguration.highcontrastbackgroundcolor)
|
||||
public var highContrastBackgroundColor : UWP.Color? {
|
||||
get { try! _default.get_HighContrastBackgroundColorImpl() }
|
||||
set { try! _default.put_HighContrastBackgroundColorImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdropconfiguration.ishighcontrast)
|
||||
public var isHighContrast : Bool {
|
||||
get { try! _default.get_IsHighContrastImpl() }
|
||||
set { try! _default.put_IsHighContrastImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdropconfiguration.isinputactive)
|
||||
public var isInputActive : Bool {
|
||||
get { try! _default.get_IsInputActiveImpl() }
|
||||
set { try! _default.put_IsInputActiveImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.systembackdropconfiguration.theme)
|
||||
public var theme : SystemBackdropTheme {
|
||||
get { try! _default.get_ThemeImpl() }
|
||||
set { try! _default.put_ThemeImpl(newValue) }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontroller)
|
||||
public protocol ISystemBackdropController : WindowsFoundation.IClosable {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontroller.settarget)
|
||||
func setTarget(_ windowId: WinAppSDK.WindowId, _ desktopWindowTarget: UWP.CompositionTarget!) throws -> Bool
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontroller.settarget)
|
||||
func setTarget(_ coreWindow: UWP.CoreWindow!, _ compositionTarget: UWP.CompositionTarget!) throws -> Bool
|
||||
}
|
||||
|
||||
extension ISystemBackdropController {
|
||||
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
switch iid {
|
||||
case __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
case __ABI_Windows_Foundation.IClosableWrapper.IID:
|
||||
let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
public typealias AnyISystemBackdropController = any ISystemBackdropController
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets)
|
||||
public protocol ISystemBackdropControllerWithTargets : WindowsFoundation.IClosable, ISystemBackdropController {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.addsystembackdroptarget)
|
||||
func addSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.removeallsystembackdroptargets)
|
||||
func removeAllSystemBackdropTargets() throws
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.removesystembackdroptarget)
|
||||
func removeSystemBackdropTarget(_ systemBackdropTarget: WinAppSDK.AnyICompositionSupportsSystemBackdrop!) throws -> Bool
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.setsystembackdropconfiguration)
|
||||
func setSystemBackdropConfiguration(_ configuration: WinAppSDK.SystemBackdropConfiguration!) throws
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.state)
|
||||
var state: WinAppSDK.SystemBackdropState { get }
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.systembackdrops.isystembackdropcontrollerwithtargets.statechanged)
|
||||
var stateChanged: Event<TypedEventHandler<ISystemBackdropControllerWithTargets?, Any?>> { get }
|
||||
}
|
||||
|
||||
extension ISystemBackdropControllerWithTargets {
|
||||
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
switch iid {
|
||||
case __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargetsWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWithTargetsWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
case __ABI_Windows_Foundation.IClosableWrapper.IID:
|
||||
let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
case __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_UI_Composition_SystemBackdrops.ISystemBackdropControllerWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
public typealias AnyISystemBackdropControllerWithTargets = any ISystemBackdropControllerWithTargets
|
||||
|
||||
extension WinAppSDK.DesktopAcrylicKind {
|
||||
public static var `default` : WinAppSDK.DesktopAcrylicKind {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CDesktopAcrylicKind_Default
|
||||
}
|
||||
public static var base : WinAppSDK.DesktopAcrylicKind {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CDesktopAcrylicKind_Base
|
||||
}
|
||||
public static var thin : WinAppSDK.DesktopAcrylicKind {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CDesktopAcrylicKind_Thin
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.DesktopAcrylicKind: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
extension WinAppSDK.MicaKind {
|
||||
public static var base : WinAppSDK.MicaKind {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CMicaKind_Base
|
||||
}
|
||||
public static var baseAlt : WinAppSDK.MicaKind {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CMicaKind_BaseAlt
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.MicaKind: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
extension WinAppSDK.SystemBackdropState {
|
||||
public static var active : WinAppSDK.SystemBackdropState {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropState_Active
|
||||
}
|
||||
public static var fallback : WinAppSDK.SystemBackdropState {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropState_Fallback
|
||||
}
|
||||
public static var highContrast : WinAppSDK.SystemBackdropState {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropState_HighContrast
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.SystemBackdropState: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
extension WinAppSDK.SystemBackdropTheme {
|
||||
public static var `default` : WinAppSDK.SystemBackdropTheme {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropTheme_Default
|
||||
}
|
||||
public static var light : WinAppSDK.SystemBackdropTheme {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropTheme_Light
|
||||
}
|
||||
public static var dark : WinAppSDK.SystemBackdropTheme {
|
||||
__x_ABI_CMicrosoft_CUI_CComposition_CSystemBackdrops_CSystemBackdropTheme_Dark
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.SystemBackdropTheme: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
7111
Sources/WinAppSDK/Microsoft.UI.Composition.swift
Normal file
7111
Sources/WinAppSDK/Microsoft.UI.Composition.swift
Normal file
File diff suppressed because it is too large
Load Diff
666
Sources/WinAppSDK/Microsoft.UI.Content+ABI.swift
Normal file
666
Sources/WinAppSDK/Microsoft.UI.Content+ABI.swift
Normal file
@ -0,0 +1,666 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter: WindowsFoundation.IID {
|
||||
.init(Data1: 0x10A11230, Data2: 0x5EB4, Data3: 0x5840, Data4: ( 0xA3,0x46,0x57,0x0F,0x4A,0x49,0x04,0x0F ))// 10A11230-5EB4-5840-A346-570F4A49040F
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverterFactory: WindowsFoundation.IID {
|
||||
.init(Data1: 0xA4B216EE, Data2: 0x0E26, Data3: 0x56BD, Data4: ( 0x92,0x09,0xA7,0x5C,0xF9,0xD8,0x0F,0x27 ))// A4B216EE-0E26-56BD-9209-A75CF9D80F27
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverterStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0xF56374CE, Data2: 0xB6DF, Data3: 0x5B42, Data4: ( 0xA5,0x8F,0x4E,0x3B,0xB0,0x39,0xE3,0xA9 ))// F56374CE-B6DF-5B42-A58F-4E3BB039E3A9
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentDeferral: WindowsFoundation.IID {
|
||||
.init(Data1: 0x470529F5, Data2: 0xCD93, Data3: 0x599B, Data4: ( 0x96,0x8E,0xF8,0xA6,0x89,0xBC,0x3A,0x07 ))// 470529F5-CD93-599B-968E-F8A689BC3A07
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentSettingChangedEventArgs: WindowsFoundation.IID {
|
||||
.init(Data1: 0x76478051, Data2: 0xFC80, Data3: 0x5EEC, Data4: ( 0xA3,0xF3,0x62,0x60,0x6A,0xBE,0x06,0xB7 ))// 76478051-FC80-5EEC-A3F3-62606ABE06B7
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentStateChangedEventArgs: WindowsFoundation.IID {
|
||||
.init(Data1: 0x8970FA4F, Data2: 0x10BA, Data3: 0x5F67, Data4: ( 0x97,0x0B,0x8C,0x72,0xBC,0x00,0x9B,0x67 ))// 8970FA4F-10BA-5F67-970B-8C72BC009B67
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIsland: WindowsFoundation.IID {
|
||||
.init(Data1: 0x5B2504BA, Data2: 0x361C, Data3: 0x50AA, Data4: ( 0xBD,0x6E,0x41,0x22,0xC6,0xD9,0x38,0x89 ))// 5B2504BA-361C-50AA-BD6E-4122C6D93889
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs: WindowsFoundation.IID {
|
||||
.init(Data1: 0x9FE24BED, Data2: 0x2B9C, Data3: 0x5137, Data4: ( 0x88,0x7F,0x40,0x3C,0x94,0x84,0x18,0x24 ))// 9FE24BED-2B9C-5137-887F-403C94841824
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment: WindowsFoundation.IID {
|
||||
.init(Data1: 0xC334236D, Data2: 0xDA88, Data3: 0x566D, Data4: ( 0x81,0x1D,0x74,0xAE,0xF2,0xEB,0xA9,0x78 ))// C334236D-DA88-566D-811D-74AEF2EBA978
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironmentFactory: WindowsFoundation.IID {
|
||||
.init(Data1: 0x47A782D6, Data2: 0xB177, Data3: 0x5C1E, Data4: ( 0xBF,0x87,0x90,0x43,0x7D,0xD8,0x09,0xD0 ))// 47A782D6-B177-5C1E-BF87-90437DD809D0
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandFactory: WindowsFoundation.IID {
|
||||
.init(Data1: 0x82383F52, Data2: 0xE81A, Data3: 0x5EC9, Data4: ( 0xA9,0x54,0xBA,0xC8,0xA9,0x31,0xBA,0x7D ))// 82383F52-E81A-5EC9-A954-BAC8A931BA7D
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs: WindowsFoundation.IID {
|
||||
.init(Data1: 0xC828EEB2, Data2: 0x0C62, Data3: 0x5B40, Data4: ( 0x9D,0x48,0x77,0xC0,0x60,0x83,0xC2,0x78 ))// C828EEB2-0C62-5B40-9D48-77C06083C278
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0x7B9EB7CC, Data2: 0x8C43, Data3: 0x5E0A, Data4: ( 0xAB,0x23,0xAB,0x48,0x62,0x8F,0xD2,0x23 ))// 7B9EB7CC-8C43-5E0A-AB23-AB48628FD223
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge: WindowsFoundation.IID {
|
||||
.init(Data1: 0xFAAAB99E, Data2: 0xA42B, Data3: 0x549C, Data4: ( 0x92,0xDF,0x3B,0x6D,0x6E,0x1E,0x36,0x8B ))// FAAAB99E-A42B-549C-92DF-3B6D6E1E368B
|
||||
}
|
||||
|
||||
public enum __ABI_Microsoft_UI_Content {
|
||||
public class IContentCoordinateConverter: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter }
|
||||
|
||||
internal func ConvertLocalToScreenWithPointImpl(_ localPoint: WindowsFoundation.Point) throws -> UWP.PointInt32 {
|
||||
var result: __x_ABI_CWindows_CGraphics_CPointInt32 = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ConvertLocalToScreenWithPoint(pThis, .from(swift: localPoint), &result))
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func ConvertLocalToScreenWithRectImpl(_ localRect: WindowsFoundation.Rect) throws -> UWP.RectInt32 {
|
||||
var result: __x_ABI_CWindows_CGraphics_CRectInt32 = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ConvertLocalToScreenWithRect(pThis, .from(swift: localRect), &result))
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func ConvertScreenToLocalWithPointImpl(_ screenPoint: UWP.PointInt32) throws -> WindowsFoundation.Point {
|
||||
var result: __x_ABI_CWindows_CFoundation_CPoint = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ConvertScreenToLocalWithPoint(pThis, .from(swift: screenPoint), &result))
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func ConvertScreenToLocalWithRectImpl(_ screenRect: UWP.RectInt32) throws -> WindowsFoundation.Rect {
|
||||
var result: __x_ABI_CWindows_CFoundation_CRect = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ConvertScreenToLocalWithRect(pThis, .from(swift: screenRect), &result))
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentCoordinateConverterFactory: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverterFactory }
|
||||
|
||||
}
|
||||
|
||||
public class IContentCoordinateConverterStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverterStatics }
|
||||
|
||||
internal func CreateForWindowIdImpl(_ windowId: WinAppSDK.WindowId) throws -> WinAppSDK.ContentCoordinateConverter? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverterStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateForWindowId(pThis, .from(swift: windowId), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentDeferral: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentDeferral }
|
||||
|
||||
internal func CompleteImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentDeferral.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Complete(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentEnvironmentSettingChangedEventArgs: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentSettingChangedEventArgs }
|
||||
|
||||
internal func get_SettingNameImpl() throws -> String {
|
||||
var value: HSTRING?
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentSettingChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_SettingName(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentEnvironmentStateChangedEventArgs: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentStateChangedEventArgs }
|
||||
|
||||
internal func get_DidAppWindowIdChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidAppWindowIdChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_DidDisplayIdChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidDisplayIdChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentIsland: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIsland }
|
||||
|
||||
internal func get_ActualSizeImpl() throws -> WindowsFoundation.Vector2 {
|
||||
var value: __x_ABI_CWindows_CFoundation_CNumerics_CVector2 = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ActualSize(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func get_AppDataImpl() throws -> Any? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AppData(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_.AnyWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
internal func put_AppDataImpl(_ value: Any?) throws {
|
||||
let valueWrapper = __ABI_.AnyWrapper(value)
|
||||
let _value = try! valueWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_AppData(pThis, _value))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_CoordinateConverterImpl() throws -> WinAppSDK.ContentCoordinateConverter? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_CoordinateConverter(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func get_CustomPropertiesImpl() throws -> WindowsFoundation.AnyIPropertySet? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_CustomProperties(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_Windows_Foundation_Collections.IPropertySetWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
internal func get_DispatcherQueueImpl() throws -> WinAppSDK.DispatcherQueue? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DispatcherQueue(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func get_EnvironmentImpl() throws -> WinAppSDK.ContentIslandEnvironment? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Environment(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func get_IdImpl() throws -> UInt64 {
|
||||
var value: UINT64 = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Id(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func get_IsConnectedImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsConnected(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_IsHitTestVisibleWhenTransparentImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsHitTestVisibleWhenTransparent(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_IsHitTestVisibleWhenTransparentImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsHitTestVisibleWhenTransparent(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_IsIslandEnabledImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsIslandEnabled(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_IsIslandEnabledImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsIslandEnabled(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_IsIslandVisibleImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsIslandVisible(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_IsIslandVisibleImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsIslandVisible(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_IsSiteEnabledImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsSiteEnabled(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_IsSiteVisibleImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsSiteVisible(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_LayoutDirectionImpl() throws -> WinAppSDK.ContentLayoutDirection {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CContent_CContentLayoutDirection = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_LayoutDirection(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func get_RasterizationScaleImpl() throws -> Float {
|
||||
var value: FLOAT = 0.0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_RasterizationScale(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func GetAutomationHostProviderImpl() throws -> Any? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetAutomationHostProvider(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_.AnyWrapper.unwrapFrom(abi: result)
|
||||
}
|
||||
|
||||
internal func GetStateChangeDeferralImpl() throws -> WinAppSDK.ContentDeferral? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetStateChangeDeferral(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func RequestSizeImpl(_ size: WindowsFoundation.Vector2) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RequestSize(pThis, .from(swift: size)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_AutomationProviderRequestedImpl(_ handler: TypedEventHandler<WinAppSDK.ContentIsland?, WinAppSDK.ContentIslandAutomationProviderRequestedEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CContent__CContentIsland___x_ABI_CMicrosoft__CUI__CContent__CContentIslandAutomationProviderRequestedEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_AutomationProviderRequested(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_AutomationProviderRequestedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_AutomationProviderRequested(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_StateChangedImpl(_ handler: TypedEventHandler<WinAppSDK.ContentIsland?, WinAppSDK.ContentIslandStateChangedEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CContent__CContentIsland___x_ABI_CMicrosoft__CUI__CContent__CContentIslandStateChangedEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_StateChanged(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_StateChangedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_StateChanged(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentIslandAutomationProviderRequestedEventArgs: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs }
|
||||
|
||||
internal func get_AutomationProviderImpl() throws -> Any? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AutomationProvider(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_.AnyWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
internal func put_AutomationProviderImpl(_ value: Any?) throws {
|
||||
let valueWrapper = __ABI_.AnyWrapper(value)
|
||||
let _value = try! valueWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_AutomationProvider(pThis, _value))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_HandledImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Handled(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_HandledImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Handled(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentIslandEnvironment: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment }
|
||||
|
||||
internal func get_AppWindowIdImpl() throws -> WinAppSDK.WindowId {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CWindowId = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_AppWindowId(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func get_DisplayIdImpl() throws -> WinAppSDK.DisplayId {
|
||||
var value: __x_ABI_CMicrosoft_CUI_CDisplayId = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DisplayId(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func add_SettingChangedImpl(_ handler: TypedEventHandler<WinAppSDK.ContentIslandEnvironment?, WinAppSDK.ContentEnvironmentSettingChangedEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CContent__CContentIslandEnvironment___x_ABI_CMicrosoft__CUI__CContent__CContentEnvironmentSettingChangedEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_SettingChanged(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_SettingChangedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_SettingChanged(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_StateChangedImpl(_ handler: TypedEventHandler<WinAppSDK.ContentIslandEnvironment?, WinAppSDK.ContentEnvironmentStateChangedEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CContent__CContentIslandEnvironment___x_ABI_CMicrosoft__CUI__CContent__CContentEnvironmentStateChangedEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_StateChanged(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_StateChangedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_StateChanged(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentIslandEnvironmentFactory: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironmentFactory }
|
||||
|
||||
}
|
||||
|
||||
public class IContentIslandFactory: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandFactory }
|
||||
|
||||
}
|
||||
|
||||
public class IContentIslandStateChangedEventArgs: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs }
|
||||
|
||||
internal func get_DidActualSizeChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidActualSizeChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_DidSiteEnabledChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidSiteEnabledChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_DidSiteVisibleChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidSiteVisibleChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_DidLayoutDirectionChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidLayoutDirectionChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_DidRasterizationScaleChangeImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DidRasterizationScaleChange(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentIslandStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStatics }
|
||||
|
||||
internal func CreateImpl(_ Root: WinAppSDK.Visual?) throws -> WinAppSDK.ContentIsland? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Create(pThis, RawPointer(Root), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func GetByVisualImpl(_ child: WinAppSDK.Visual?) throws -> WinAppSDK.ContentIsland? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetByVisual(pThis, RawPointer(child), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func GetFromIdImpl(_ id: UInt64) throws -> WinAppSDK.ContentIsland? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetFromId(pThis, id, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IContentSiteBridge: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge }
|
||||
|
||||
open func get_DispatcherQueueImpl() throws -> WinAppSDK.DispatcherQueue? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DispatcherQueue(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
open func get_LayoutDirectionOverrideImpl() throws -> WinAppSDK.ContentLayoutDirection? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_LayoutDirectionOverride(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIReference_1___x_ABI_CMicrosoft__CUI__CContent__CContentLayoutDirectionWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
open func put_LayoutDirectionOverrideImpl(_ value: WinAppSDK.ContentLayoutDirection?) throws {
|
||||
let valueWrapper = WinAppSDK.__x_ABI_C__FIReference_1___x_ABI_CMicrosoft__CUI__CContent__CContentLayoutDirectionWrapper(value)
|
||||
let _value = try! valueWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_LayoutDirectionOverride(pThis, _value))
|
||||
}
|
||||
}
|
||||
|
||||
open func get_OverrideScaleImpl() throws -> Float {
|
||||
var value: FLOAT = 0.0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_OverrideScale(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
open func put_OverrideScaleImpl(_ value: Float) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_OverrideScale(pThis, value))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static var IContentSiteBridgeVTable: __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridgeVtbl = .init(
|
||||
QueryInterface: { IContentSiteBridgeWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { IContentSiteBridgeWrapper.addRef($0) },
|
||||
Release: { IContentSiteBridgeWrapper.release($0) },
|
||||
GetIids: {
|
||||
let size = MemoryLayout<WindowsFoundation.IID>.size
|
||||
let iids = CoTaskMemAlloc(UInt64(size) * 4).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
||||
iids[0] = IUnknown.IID
|
||||
iids[1] = IInspectable.IID
|
||||
iids[2] = __ABI_Microsoft_UI_Content.IContentSiteBridgeWrapper.IID
|
||||
iids[3] = __ABI_Windows_Foundation.IClosableWrapper.IID
|
||||
$1!.pointee = 4
|
||||
$2!.pointee = iids
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetRuntimeClassName: {
|
||||
_ = $0
|
||||
let hstring = try! HString("Microsoft.UI.Content.IContentSiteBridge").detach()
|
||||
$1!.pointee = hstring
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetTrustLevel: {
|
||||
_ = $0
|
||||
$1!.pointee = TrustLevel(rawValue: 0)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_DispatcherQueue: {
|
||||
guard let __unwrapped__instance = IContentSiteBridgeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.dispatcherQueue
|
||||
value?.copyTo($1)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_LayoutDirectionOverride: {
|
||||
guard let __unwrapped__instance = IContentSiteBridgeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.layoutDirectionOverride
|
||||
let valueWrapper = WinAppSDK.__x_ABI_C__FIReference_1___x_ABI_CMicrosoft__CUI__CContent__CContentLayoutDirectionWrapper(value)
|
||||
valueWrapper?.copyTo($1)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
put_LayoutDirectionOverride: {
|
||||
guard let __unwrapped__instance = IContentSiteBridgeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value: WinAppSDK.ContentLayoutDirection? = WinAppSDK.__x_ABI_C__FIReference_1___x_ABI_CMicrosoft__CUI__CContent__CContentLayoutDirectionWrapper.unwrapFrom(abi: ComPtr($1))
|
||||
__unwrapped__instance.layoutDirectionOverride = value
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_OverrideScale: {
|
||||
guard let __unwrapped__instance = IContentSiteBridgeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.overrideScale
|
||||
$1?.initialize(to: value)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
put_OverrideScale: {
|
||||
guard let __unwrapped__instance = IContentSiteBridgeWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value: Float = $1
|
||||
__unwrapped__instance.overrideScale = value
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
|
||||
public typealias IContentSiteBridgeWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Content.IContentSiteBridgeBridge>
|
||||
}
|
||||
56
Sources/WinAppSDK/Microsoft.UI.Content+Impl.swift
Normal file
56
Sources/WinAppSDK/Microsoft.UI.Content+Impl.swift
Normal file
@ -0,0 +1,56 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Content {
|
||||
public enum IContentSiteBridgeBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteBridge
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentSiteBridge
|
||||
public typealias SwiftProjection = AnyIContentSiteBridge
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IContentSiteBridgeImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Content.IContentSiteBridgeVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IContentSiteBridgeImpl: IContentSiteBridge, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IContentSiteBridgeBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.dispatcherqueue)
|
||||
fileprivate var dispatcherQueue : WinAppSDK.DispatcherQueue! {
|
||||
get { try! _default.get_DispatcherQueueImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.layoutdirectionoverride)
|
||||
fileprivate var layoutDirectionOverride : ContentLayoutDirection? {
|
||||
get { try! _default.get_LayoutDirectionOverrideImpl() }
|
||||
set { try! _default.put_LayoutDirectionOverrideImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.overridescale)
|
||||
fileprivate var overrideScale : Float {
|
||||
get { try! _default.get_OverrideScaleImpl() }
|
||||
set { try! _default.put_OverrideScaleImpl(newValue) }
|
||||
}
|
||||
|
||||
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.close)
|
||||
fileprivate func close() throws {
|
||||
try _IClosable.CloseImpl()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
669
Sources/WinAppSDK/Microsoft.UI.Content.swift
Normal file
669
Sources/WinAppSDK/Microsoft.UI.Content.swift
Normal file
@ -0,0 +1,669 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateroundingmode)
|
||||
public typealias ContentCoordinateRoundingMode = __x_ABI_CMicrosoft_CUI_CContent_CContentCoordinateRoundingMode
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentlayoutdirection)
|
||||
public typealias ContentLayoutDirection = __x_ABI_CMicrosoft_CUI_CContent_CContentLayoutDirection
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter)
|
||||
open class ContentCoordinateConverter : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentCoordinateConverter
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override open func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter>?) -> ContentCoordinateConverter? {
|
||||
guard let abi = abi else { return nil }
|
||||
return UnsealedWinRTClassWrapper<Composable>.unwrapFrom(base: abi)
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init<Composable: ComposableImpl>(
|
||||
composing: Composable.Type,
|
||||
_ createCallback: (UnsealedWinRTClassWrapper<Composable>?, inout WindowsFoundation.IInspectable?) -> Composable.Default.SwiftABI)
|
||||
{
|
||||
super.init()
|
||||
MakeComposed(composing: composing, (self as! Composable.Class), createCallback)
|
||||
}
|
||||
override open func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
private static var _IContentCoordinateConverterFactory : __ABI_Microsoft_UI_Content.IContentCoordinateConverterFactory = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentCoordinateConverter"))
|
||||
|
||||
private static let _IContentCoordinateConverterStatics: __ABI_Microsoft_UI_Content.IContentCoordinateConverterStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentCoordinateConverter"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter.createforwindowid)
|
||||
public class func createForWindowId(_ windowId: WinAppSDK.WindowId) -> ContentCoordinateConverter! {
|
||||
return try! _IContentCoordinateConverterStatics.CreateForWindowIdImpl(windowId)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter.convertlocaltoscreen)
|
||||
public func convertLocalToScreen(_ localPoint: WindowsFoundation.Point) throws -> UWP.PointInt32 {
|
||||
try _default.ConvertLocalToScreenWithPointImpl(localPoint)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter.convertlocaltoscreen)
|
||||
public func convertLocalToScreen(_ localRect: WindowsFoundation.Rect) throws -> UWP.RectInt32 {
|
||||
try _default.ConvertLocalToScreenWithRectImpl(localRect)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter.convertscreentolocal)
|
||||
public func convertScreenToLocal(_ screenPoint: UWP.PointInt32) throws -> WindowsFoundation.Point {
|
||||
try _default.ConvertScreenToLocalWithPointImpl(screenPoint)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentcoordinateconverter.convertscreentolocal)
|
||||
public func convertScreenToLocal(_ screenRect: UWP.RectInt32) throws -> WindowsFoundation.Rect {
|
||||
try _default.ConvertScreenToLocalWithRectImpl(screenRect)
|
||||
}
|
||||
|
||||
internal enum IContentCoordinateConverter : ComposableImpl {
|
||||
internal typealias CABI = C_IInspectable
|
||||
internal typealias SwiftABI = WindowsFoundation.IInspectable
|
||||
internal typealias Class = ContentCoordinateConverter
|
||||
internal typealias SwiftProjection = WinRTClassWeakReference<Class>
|
||||
internal enum Default : AbiInterface {
|
||||
internal typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentCoordinateConverter
|
||||
internal typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentCoordinateConverter
|
||||
}
|
||||
}
|
||||
internal typealias Composable = IContentCoordinateConverter
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentdeferral)
|
||||
public final class ContentDeferral : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentDeferral
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentDeferral
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentDeferral>?) -> ContentDeferral? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentdeferral.complete)
|
||||
public func complete() throws {
|
||||
try _default.CompleteImpl()
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentenvironmentsettingchangedeventargs)
|
||||
public final class ContentEnvironmentSettingChangedEventArgs : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentEnvironmentSettingChangedEventArgs
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentSettingChangedEventArgs
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentSettingChangedEventArgs>?) -> ContentEnvironmentSettingChangedEventArgs? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentenvironmentsettingchangedeventargs.settingname)
|
||||
public var settingName : String {
|
||||
get { try! _default.get_SettingNameImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentenvironmentstatechangedeventargs)
|
||||
public final class ContentEnvironmentStateChangedEventArgs : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentEnvironmentStateChangedEventArgs
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentStateChangedEventArgs
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentEnvironmentStateChangedEventArgs>?) -> ContentEnvironmentStateChangedEventArgs? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentenvironmentstatechangedeventargs.didappwindowidchange)
|
||||
public var didAppWindowIdChange : Bool {
|
||||
get { try! _default.get_DidAppWindowIdChangeImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentenvironmentstatechangedeventargs.diddisplayidchange)
|
||||
public var didDisplayIdChange : Bool {
|
||||
get { try! _default.get_DidDisplayIdChangeImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland)
|
||||
open class ContentIsland : WinRTClass, WindowsFoundation.IClosable, WinAppSDK.IClosableNotifier, WinAppSDK.ICompositionSupportsSystemBackdrop {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentIsland
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override open func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentIsland>?) -> ContentIsland? {
|
||||
guard let abi = abi else { return nil }
|
||||
return UnsealedWinRTClassWrapper<Composable>.unwrapFrom(base: abi)
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init<Composable: ComposableImpl>(
|
||||
composing: Composable.Type,
|
||||
_ createCallback: (UnsealedWinRTClassWrapper<Composable>?, inout WindowsFoundation.IInspectable?) -> Composable.Default.SwiftABI)
|
||||
{
|
||||
super.init()
|
||||
MakeComposed(composing: composing, (self as! Composable.Class), createCallback)
|
||||
}
|
||||
override open func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
private static var _IContentIslandFactory : __ABI_Microsoft_UI_Content.IContentIslandFactory = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentIsland"))
|
||||
|
||||
private static let _IContentIslandStatics: __ABI_Microsoft_UI_Content.IContentIslandStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentIsland"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.create)
|
||||
public class func create(_ Root: WinAppSDK.Visual!) -> ContentIsland! {
|
||||
return try! _IContentIslandStatics.CreateImpl(Root)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.getbyvisual)
|
||||
public class func getByVisual(_ child: WinAppSDK.Visual!) -> ContentIsland! {
|
||||
return try! _IContentIslandStatics.GetByVisualImpl(child)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.getfromid)
|
||||
public class func getFromId(_ id: UInt64) -> ContentIsland! {
|
||||
return try! _IContentIslandStatics.GetFromIdImpl(id)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.getautomationhostprovider)
|
||||
public func getAutomationHostProvider() throws -> Any! {
|
||||
try _default.GetAutomationHostProviderImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.getstatechangedeferral)
|
||||
public func getStateChangeDeferral() throws -> ContentDeferral! {
|
||||
try _default.GetStateChangeDeferralImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.requestsize)
|
||||
public func requestSize(_ size: WindowsFoundation.Vector2) throws {
|
||||
try _default.RequestSizeImpl(size)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.actualsize)
|
||||
public var actualSize : WindowsFoundation.Vector2 {
|
||||
get { try! _default.get_ActualSizeImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.appdata)
|
||||
public var appData : Any! {
|
||||
get { try! _default.get_AppDataImpl() }
|
||||
set { try! _default.put_AppDataImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.coordinateconverter)
|
||||
public var coordinateConverter : ContentCoordinateConverter! {
|
||||
get { try! _default.get_CoordinateConverterImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.customproperties)
|
||||
public var customProperties : WindowsFoundation.AnyIPropertySet! {
|
||||
get { try! _default.get_CustomPropertiesImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.dispatcherqueue)
|
||||
public var dispatcherQueue : WinAppSDK.DispatcherQueue! {
|
||||
get { try! _default.get_DispatcherQueueImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.environment)
|
||||
public var environment : ContentIslandEnvironment! {
|
||||
get { try! _default.get_EnvironmentImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.id)
|
||||
public var id : UInt64 {
|
||||
get { try! _default.get_IdImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.isconnected)
|
||||
public var isConnected : Bool {
|
||||
get { try! _default.get_IsConnectedImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.ishittestvisiblewhentransparent)
|
||||
public var isHitTestVisibleWhenTransparent : Bool {
|
||||
get { try! _default.get_IsHitTestVisibleWhenTransparentImpl() }
|
||||
set { try! _default.put_IsHitTestVisibleWhenTransparentImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.isislandenabled)
|
||||
public var isIslandEnabled : Bool {
|
||||
get { try! _default.get_IsIslandEnabledImpl() }
|
||||
set { try! _default.put_IsIslandEnabledImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.isislandvisible)
|
||||
public var isIslandVisible : Bool {
|
||||
get { try! _default.get_IsIslandVisibleImpl() }
|
||||
set { try! _default.put_IsIslandVisibleImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.issiteenabled)
|
||||
public var isSiteEnabled : Bool {
|
||||
get { try! _default.get_IsSiteEnabledImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.issitevisible)
|
||||
public var isSiteVisible : Bool {
|
||||
get { try! _default.get_IsSiteVisibleImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.layoutdirection)
|
||||
public var layoutDirection : ContentLayoutDirection {
|
||||
get { try! _default.get_LayoutDirectionImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.rasterizationscale)
|
||||
public var rasterizationScale : Float {
|
||||
get { try! _default.get_RasterizationScaleImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.automationproviderrequested)
|
||||
public lazy var automationProviderRequested : Event<TypedEventHandler<ContentIsland?, ContentIslandAutomationProviderRequestedEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_AutomationProviderRequestedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_AutomationProviderRequestedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.statechanged)
|
||||
public lazy var stateChanged : Event<TypedEventHandler<ContentIsland?, ContentIslandStateChangedEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_StateChangedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_StateChangedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
private lazy var _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.close)
|
||||
public func close() throws {
|
||||
try _IClosable.CloseImpl()
|
||||
}
|
||||
|
||||
private lazy var _IClosableNotifier: __ABI_Microsoft_UI.IClosableNotifier! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.isclosed)
|
||||
public var isClosed : Bool {
|
||||
get { try! _IClosableNotifier.get_IsClosedImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.closed)
|
||||
public lazy var closed : Event<WinAppSDK.ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IClosableNotifier else { return .init() }
|
||||
return try! this.add_ClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IClosableNotifier.remove_ClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.frameworkclosed)
|
||||
public lazy var frameworkClosed : Event<WinAppSDK.ClosableNotifierHandler> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IClosableNotifier else { return .init() }
|
||||
return try! this.add_FrameworkClosedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IClosableNotifier.remove_FrameworkClosedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
private lazy var _ICompositionSupportsSystemBackdrop: __ABI_Microsoft_UI_Composition.ICompositionSupportsSystemBackdrop! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentisland.systembackdrop)
|
||||
public var systemBackdrop : UWP.CompositionBrush! {
|
||||
get { try! _ICompositionSupportsSystemBackdrop.get_SystemBackdropImpl() }
|
||||
set { try! _ICompositionSupportsSystemBackdrop.put_SystemBackdropImpl(newValue) }
|
||||
}
|
||||
|
||||
internal enum IContentIsland : ComposableImpl {
|
||||
internal typealias CABI = C_IInspectable
|
||||
internal typealias SwiftABI = WindowsFoundation.IInspectable
|
||||
internal typealias Class = ContentIsland
|
||||
internal typealias SwiftProjection = WinRTClassWeakReference<Class>
|
||||
internal enum Default : AbiInterface {
|
||||
internal typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentIsland
|
||||
internal typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentIsland
|
||||
}
|
||||
}
|
||||
internal typealias Composable = IContentIsland
|
||||
deinit {
|
||||
_default = nil
|
||||
_IClosable = nil
|
||||
_IClosableNotifier = nil
|
||||
_ICompositionSupportsSystemBackdrop = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandautomationproviderrequestedeventargs)
|
||||
public final class ContentIslandAutomationProviderRequestedEventArgs : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentIslandAutomationProviderRequestedEventArgs
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentIslandAutomationProviderRequestedEventArgs>?) -> ContentIslandAutomationProviderRequestedEventArgs? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandautomationproviderrequestedeventargs.automationprovider)
|
||||
public var automationProvider : Any! {
|
||||
get { try! _default.get_AutomationProviderImpl() }
|
||||
set { try! _default.put_AutomationProviderImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandautomationproviderrequestedeventargs.handled)
|
||||
public var handled : Bool {
|
||||
get { try! _default.get_HandledImpl() }
|
||||
set { try! _default.put_HandledImpl(newValue) }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandenvironment)
|
||||
open class ContentIslandEnvironment : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentIslandEnvironment
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override open func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment>?) -> ContentIslandEnvironment? {
|
||||
guard let abi = abi else { return nil }
|
||||
return UnsealedWinRTClassWrapper<Composable>.unwrapFrom(base: abi)
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init<Composable: ComposableImpl>(
|
||||
composing: Composable.Type,
|
||||
_ createCallback: (UnsealedWinRTClassWrapper<Composable>?, inout WindowsFoundation.IInspectable?) -> Composable.Default.SwiftABI)
|
||||
{
|
||||
super.init()
|
||||
MakeComposed(composing: composing, (self as! Composable.Class), createCallback)
|
||||
}
|
||||
override open func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
private static var _IContentIslandEnvironmentFactory : __ABI_Microsoft_UI_Content.IContentIslandEnvironmentFactory = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentIslandEnvironment"))
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandenvironment.appwindowid)
|
||||
public var appWindowId : WinAppSDK.WindowId {
|
||||
get { try! _default.get_AppWindowIdImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandenvironment.displayid)
|
||||
public var displayId : WinAppSDK.DisplayId {
|
||||
get { try! _default.get_DisplayIdImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandenvironment.settingchanged)
|
||||
public lazy var settingChanged : Event<TypedEventHandler<ContentIslandEnvironment?, ContentEnvironmentSettingChangedEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_SettingChangedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_SettingChangedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandenvironment.statechanged)
|
||||
public lazy var stateChanged : Event<TypedEventHandler<ContentIslandEnvironment?, ContentEnvironmentStateChangedEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_StateChangedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_StateChangedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
internal enum IContentIslandEnvironment : ComposableImpl {
|
||||
internal typealias CABI = C_IInspectable
|
||||
internal typealias SwiftABI = WindowsFoundation.IInspectable
|
||||
internal typealias Class = ContentIslandEnvironment
|
||||
internal typealias SwiftProjection = WinRTClassWeakReference<Class>
|
||||
internal enum Default : AbiInterface {
|
||||
internal typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandEnvironment
|
||||
internal typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentIslandEnvironment
|
||||
}
|
||||
}
|
||||
internal typealias Composable = IContentIslandEnvironment
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandstatechangedeventargs)
|
||||
public final class ContentIslandStateChangedEventArgs : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentIslandStateChangedEventArgs
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CContent_CIContentIslandStateChangedEventArgs>?) -> ContentIslandStateChangedEventArgs? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandstatechangedeventargs.didactualsizechange)
|
||||
public var didActualSizeChange : Bool {
|
||||
get { try! _default.get_DidActualSizeChangeImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandstatechangedeventargs.didlayoutdirectionchange)
|
||||
public var didLayoutDirectionChange : Bool {
|
||||
get { try! _default.get_DidLayoutDirectionChangeImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandstatechangedeventargs.didrasterizationscalechange)
|
||||
public var didRasterizationScaleChange : Bool {
|
||||
get { try! _default.get_DidRasterizationScaleChangeImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandstatechangedeventargs.didsiteenabledchange)
|
||||
public var didSiteEnabledChange : Bool {
|
||||
get { try! _default.get_DidSiteEnabledChangeImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentislandstatechangedeventargs.didsitevisiblechange)
|
||||
public var didSiteVisibleChange : Bool {
|
||||
get { try! _default.get_DidSiteVisibleChangeImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge)
|
||||
public protocol IContentSiteBridge : WindowsFoundation.IClosable {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.dispatcherqueue)
|
||||
var dispatcherQueue: WinAppSDK.DispatcherQueue! { get }
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.layoutdirectionoverride)
|
||||
var layoutDirectionOverride: WinAppSDK.ContentLayoutDirection? { get set }
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.icontentsitebridge.overridescale)
|
||||
var overrideScale: Float { get set }
|
||||
}
|
||||
|
||||
extension IContentSiteBridge {
|
||||
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
switch iid {
|
||||
case __ABI_Microsoft_UI_Content.IContentSiteBridgeWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_UI_Content.IContentSiteBridgeWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
case __ABI_Windows_Foundation.IClosableWrapper.IID:
|
||||
let wrapper = __ABI_Windows_Foundation.IClosableWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
public typealias AnyIContentSiteBridge = any IContentSiteBridge
|
||||
|
||||
extension WinAppSDK.ContentCoordinateRoundingMode {
|
||||
public static var auto : WinAppSDK.ContentCoordinateRoundingMode {
|
||||
__x_ABI_CMicrosoft_CUI_CContent_CContentCoordinateRoundingMode_Auto
|
||||
}
|
||||
public static var floor : WinAppSDK.ContentCoordinateRoundingMode {
|
||||
__x_ABI_CMicrosoft_CUI_CContent_CContentCoordinateRoundingMode_Floor
|
||||
}
|
||||
public static var round : WinAppSDK.ContentCoordinateRoundingMode {
|
||||
__x_ABI_CMicrosoft_CUI_CContent_CContentCoordinateRoundingMode_Round
|
||||
}
|
||||
public static var ceiling : WinAppSDK.ContentCoordinateRoundingMode {
|
||||
__x_ABI_CMicrosoft_CUI_CContent_CContentCoordinateRoundingMode_Ceiling
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.ContentCoordinateRoundingMode: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
extension WinAppSDK.ContentLayoutDirection {
|
||||
public static var leftToRight : WinAppSDK.ContentLayoutDirection {
|
||||
__x_ABI_CMicrosoft_CUI_CContent_CContentLayoutDirection_LeftToRight
|
||||
}
|
||||
public static var rightToLeft : WinAppSDK.ContentLayoutDirection {
|
||||
__x_ABI_CMicrosoft_CUI_CContent_CContentLayoutDirection_RightToLeft
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.ContentLayoutDirection: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
390
Sources/WinAppSDK/Microsoft.UI.Dispatching+ABI.swift
Normal file
390
Sources/WinAppSDK/Microsoft.UI.Dispatching+ABI.swift
Normal file
@ -0,0 +1,390 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral: WindowsFoundation.IID {
|
||||
.init(Data1: 0x910B5AAC, Data2: 0x3310, Data3: 0x563E, Data4: ( 0x84,0x18,0xF3,0x00,0x55,0x79,0x72,0x9E ))// 910B5AAC-3310-563E-8418-F3005579729E
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue: WindowsFoundation.IID {
|
||||
.init(Data1: 0xF6EBF8FA, Data2: 0xBE1C, Data3: 0x5BF6, Data4: ( 0xA4,0x67,0x73,0xDA,0x28,0x73,0x8A,0xE8 ))// F6EBF8FA-BE1C-5BF6-A467-73DA28738AE8
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue2: WindowsFoundation.IID {
|
||||
.init(Data1: 0x0CF48751, Data2: 0xF1AC, Data3: 0x59B8, Data4: ( 0xBA,0x52,0x6C,0xE7,0xA1,0x44,0x4D,0x6F ))// 0CF48751-F1AC-59B8-BA52-6CE7A1444D6F
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3: WindowsFoundation.IID {
|
||||
.init(Data1: 0x14A7A175, Data2: 0x5C27, Data3: 0x5A35, Data4: ( 0xB0,0x79,0x21,0x96,0x0C,0xF7,0x64,0xA8 ))// 14A7A175-5C27-5A35-B079-21960CF764A8
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController: WindowsFoundation.IID {
|
||||
.init(Data1: 0xBCE8178D, Data2: 0x2183, Data3: 0x584C, Data4: ( 0x9E,0x5B,0xF9,0x36,0x6F,0x6A,0xE4,0x84 ))// BCE8178D-2183-584C-9E5B-F9366F6AE484
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController2: WindowsFoundation.IID {
|
||||
.init(Data1: 0x4C68EE2A, Data2: 0x1CB1, Data3: 0x5591, Data4: ( 0xA3,0xA2,0x9B,0x59,0x0B,0x8F,0x8B,0x9A ))// 4C68EE2A-1CB1-5591-A3A2-9B590B8F8B9A
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0xF18D6145, Data2: 0x722B, Data3: 0x593D, Data4: ( 0xBC,0xF2,0xA6,0x1E,0x71,0x3F,0x00,0x37 ))// F18D6145-722B-593D-BCF2-A61E713F0037
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs: WindowsFoundation.IID {
|
||||
.init(Data1: 0x32519BE5, Data2: 0x072B, Data3: 0x5660, Data4: ( 0xA7,0x0E,0x88,0x35,0xC9,0xB8,0x15,0x7D ))// 32519BE5-072B-5660-A70E-8835C9B8157D
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0xCD3382EA, Data2: 0xA455, Data3: 0x5124, Data4: ( 0xB6,0x3A,0xCA,0x40,0xD3,0x4C,0xA2,0x3C ))// CD3382EA-A455-5124-B63A-CA40D34CA23C
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer: WindowsFoundation.IID {
|
||||
.init(Data1: 0xAD4D63FD, Data2: 0x88FE, Data3: 0x541F, Data4: ( 0xAC,0x11,0xBF,0x2D,0xC1,0xED,0x2C,0xE5 ))// AD4D63FD-88FE-541F-AC11-BF2DC1ED2CE5
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler: WindowsFoundation.IID {
|
||||
.init(Data1: 0x2E0872A9, Data2: 0x4E29, Data3: 0x5F14, Data4: ( 0xB6,0x88,0xFB,0x96,0xD5,0xF9,0xD5,0xF8 ))// 2E0872A9-4E29-5F14-B688-FB96D5F9D5F8
|
||||
}
|
||||
|
||||
public enum __ABI_Microsoft_UI_Dispatching {
|
||||
public class IDispatcherExitDeferral: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral }
|
||||
|
||||
internal func CompleteImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Complete(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueue: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue }
|
||||
|
||||
internal func CreateTimerImpl() throws -> WinAppSDK.DispatcherQueueTimer? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateTimer(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func TryEnqueueImpl(_ callback: WinAppSDK.DispatcherQueueHandler?) throws -> Bool {
|
||||
var result: boolean = 0
|
||||
let callbackWrapper = __ABI_Microsoft_UI_Dispatching.DispatcherQueueHandlerWrapper(callback)
|
||||
let _callback = try! callbackWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.TryEnqueue(pThis, _callback, &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
internal func TryEnqueueWithPriorityImpl(_ priority: WinAppSDK.DispatcherQueuePriority, _ callback: WinAppSDK.DispatcherQueueHandler?) throws -> Bool {
|
||||
var result: boolean = 0
|
||||
let callbackWrapper = __ABI_Microsoft_UI_Dispatching.DispatcherQueueHandlerWrapper(callback)
|
||||
let _callback = try! callbackWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.TryEnqueueWithPriority(pThis, priority, _callback, &result))
|
||||
}
|
||||
return .init(from: result)
|
||||
}
|
||||
|
||||
internal func add_ShutdownStartingImpl(_ handler: TypedEventHandler<WinAppSDK.DispatcherQueue?, WinAppSDK.DispatcherQueueShutdownStartingEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueueShutdownStartingEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ShutdownStarting(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_ShutdownStartingImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ShutdownStarting(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_ShutdownCompletedImpl(_ handler: TypedEventHandler<WinAppSDK.DispatcherQueue?, Any?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue_IInspectableWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ShutdownCompleted(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_ShutdownCompletedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ShutdownCompleted(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueue2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue2 }
|
||||
|
||||
internal func get_HasThreadAccessImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_HasThreadAccess(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueue3: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3 }
|
||||
|
||||
internal func EnqueueEventLoopExitImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.EnqueueEventLoopExit(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
internal func EnsureSystemDispatcherQueueImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.EnsureSystemDispatcherQueue(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
internal func RunEventLoopImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RunEventLoop(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
internal func RunEventLoopWithOptionsImpl(_ options: WinAppSDK.DispatcherRunOptions, _ deferral: WinAppSDK.DispatcherExitDeferral?) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RunEventLoopWithOptions(pThis, options, RawPointer(deferral)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_FrameworkShutdownStartingImpl(_ handler: TypedEventHandler<WinAppSDK.DispatcherQueue?, WinAppSDK.DispatcherQueueShutdownStartingEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueueShutdownStartingEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_FrameworkShutdownStarting(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_FrameworkShutdownStartingImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_FrameworkShutdownStarting(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_FrameworkShutdownCompletedImpl(_ handler: TypedEventHandler<WinAppSDK.DispatcherQueue?, Any?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueue_IInspectableWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_FrameworkShutdownCompleted(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_FrameworkShutdownCompletedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue3.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_FrameworkShutdownCompleted(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueueController: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController }
|
||||
|
||||
internal func get_DispatcherQueueImpl() throws -> WinAppSDK.DispatcherQueue? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_DispatcherQueue(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func ShutdownQueueAsyncImpl() throws -> WindowsFoundation.AnyIAsyncAction? {
|
||||
let (operation) = try ComPtrs.initialize { operationAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ShutdownQueueAsync(pThis, &operationAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueueController2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController2 }
|
||||
|
||||
internal func ShutdownQueueImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.ShutdownQueue(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueueControllerStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics }
|
||||
|
||||
internal func CreateOnDedicatedThreadImpl() throws -> WinAppSDK.DispatcherQueueController? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateOnDedicatedThread(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func CreateOnCurrentThreadImpl() throws -> WinAppSDK.DispatcherQueueController? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueControllerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateOnCurrentThread(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueueShutdownStartingEventArgs: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs }
|
||||
|
||||
internal func GetDeferralImpl() throws -> WindowsFoundation.Deferral? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetDeferral(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueueStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueStatics }
|
||||
|
||||
internal func GetForCurrentThreadImpl() throws -> WinAppSDK.DispatcherQueue? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetForCurrentThread(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IDispatcherQueueTimer: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer }
|
||||
|
||||
internal func get_IntervalImpl() throws -> WindowsFoundation.TimeSpan {
|
||||
var value: __x_ABI_CWindows_CFoundation_CTimeSpan = .init()
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Interval(pThis, &value))
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func put_IntervalImpl(_ value: WindowsFoundation.TimeSpan) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_Interval(pThis, .from(swift: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_IsRunningImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsRunning(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_IsRepeatingImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsRepeating(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func put_IsRepeatingImpl(_ value: Bool) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.put_IsRepeating(pThis, .init(from: value)))
|
||||
}
|
||||
}
|
||||
|
||||
internal func StartImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Start(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
internal func StopImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Stop(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
internal func add_TickImpl(_ handler: TypedEventHandler<WinAppSDK.DispatcherQueueTimer?, Any?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CUI__CDispatching__CDispatcherQueueTimer_IInspectableWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_Tick(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_TickImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Tick(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// MARK - DispatcherQueueHandler
|
||||
extension __ABI_Microsoft_UI_Dispatching {
|
||||
public class DispatcherQueueHandler: WindowsFoundation.IUnknown {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler }
|
||||
|
||||
open func InvokeImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Invoke(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
typealias DispatcherQueueHandlerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_UI_Dispatching.DispatcherQueueHandlerBridge>
|
||||
internal static var DispatcherQueueHandlerVTable: __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandlerVtbl = .init(
|
||||
QueryInterface: { DispatcherQueueHandlerWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { DispatcherQueueHandlerWrapper.addRef($0) },
|
||||
Release: { DispatcherQueueHandlerWrapper.release($0) },
|
||||
Invoke: {
|
||||
guard let __unwrapped__instance = DispatcherQueueHandlerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
__unwrapped__instance()
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
}
|
||||
public extension WinRTDelegateBridge where CABI == __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler {
|
||||
static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Dispatching.DispatcherQueueHandlerVTable) { $0 }
|
||||
return .init(lpVtbl:vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
22
Sources/WinAppSDK/Microsoft.UI.Dispatching+Impl.swift
Normal file
22
Sources/WinAppSDK/Microsoft.UI.Dispatching+Impl.swift
Normal file
@ -0,0 +1,22 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Dispatching {
|
||||
public class DispatcherQueueHandlerBridge : WinRTDelegateBridge {
|
||||
public typealias Handler = DispatcherQueueHandler
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueHandler
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Dispatching.DispatcherQueueHandler
|
||||
|
||||
public static func from(abi: ComPtr<CABI>?) -> Handler? {
|
||||
guard let abi = abi else { return nil }
|
||||
let _default = SwiftABI(abi)
|
||||
let handler: Handler = { () in
|
||||
try! _default.InvokeImpl()
|
||||
}
|
||||
return handler
|
||||
}
|
||||
}
|
||||
}
|
||||
366
Sources/WinAppSDK/Microsoft.UI.Dispatching.swift
Normal file
366
Sources/WinAppSDK/Microsoft.UI.Dispatching.swift
Normal file
@ -0,0 +1,366 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuepriority)
|
||||
public typealias DispatcherQueuePriority = __x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherQueuePriority
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherrunoptions)
|
||||
public typealias DispatcherRunOptions = __x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherRunOptions
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherexitdeferral)
|
||||
public final class DispatcherExitDeferral : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Dispatching.IDispatcherExitDeferral
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherExitDeferral>?) -> DispatcherExitDeferral? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
override public init() {
|
||||
super.init(try! RoActivateInstance(HString("Microsoft.UI.Dispatching.DispatcherExitDeferral")))
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherexitdeferral.complete)
|
||||
public func complete() throws {
|
||||
try _default.CompleteImpl()
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue)
|
||||
public final class DispatcherQueue : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Dispatching.IDispatcherQueue
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueue>?) -> DispatcherQueue? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
private static let _IDispatcherQueueStatics: __ABI_Microsoft_UI_Dispatching.IDispatcherQueueStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Dispatching.DispatcherQueue"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.getforcurrentthread)
|
||||
public static func getForCurrentThread() -> DispatcherQueue! {
|
||||
return try! _IDispatcherQueueStatics.GetForCurrentThreadImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.createtimer)
|
||||
public func createTimer() throws -> DispatcherQueueTimer! {
|
||||
try _default.CreateTimerImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.tryenqueue)
|
||||
public func tryEnqueue(_ callback: DispatcherQueueHandler!) throws -> Bool {
|
||||
try _default.TryEnqueueImpl(callback)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.tryenqueue)
|
||||
public func tryEnqueue(_ priority: DispatcherQueuePriority, _ callback: DispatcherQueueHandler!) throws -> Bool {
|
||||
try _default.TryEnqueueWithPriorityImpl(priority, callback)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.shutdowncompleted)
|
||||
public lazy var shutdownCompleted : Event<TypedEventHandler<DispatcherQueue?, Any?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_ShutdownCompletedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_ShutdownCompletedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.shutdownstarting)
|
||||
public lazy var shutdownStarting : Event<TypedEventHandler<DispatcherQueue?, DispatcherQueueShutdownStartingEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_ShutdownStartingImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_ShutdownStartingImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
private lazy var _IDispatcherQueue2: __ABI_Microsoft_UI_Dispatching.IDispatcherQueue2! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.hasthreadaccess)
|
||||
public var hasThreadAccess : Bool {
|
||||
get { try! _IDispatcherQueue2.get_HasThreadAccessImpl() }
|
||||
}
|
||||
|
||||
private lazy var _IDispatcherQueue3: __ABI_Microsoft_UI_Dispatching.IDispatcherQueue3! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.enqueueeventloopexit)
|
||||
public func enqueueEventLoopExit() throws {
|
||||
try _IDispatcherQueue3.EnqueueEventLoopExitImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.ensuresystemdispatcherqueue)
|
||||
public func ensureSystemDispatcherQueue() throws {
|
||||
try _IDispatcherQueue3.EnsureSystemDispatcherQueueImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.runeventloop)
|
||||
public func runEventLoop() throws {
|
||||
try _IDispatcherQueue3.RunEventLoopImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.runeventloop)
|
||||
public func runEventLoop(_ options: DispatcherRunOptions, _ deferral: DispatcherExitDeferral!) throws {
|
||||
try _IDispatcherQueue3.RunEventLoopWithOptionsImpl(options, deferral)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.frameworkshutdowncompleted)
|
||||
public lazy var frameworkShutdownCompleted : Event<TypedEventHandler<DispatcherQueue?, Any?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IDispatcherQueue3 else { return .init() }
|
||||
return try! this.add_FrameworkShutdownCompletedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IDispatcherQueue3.remove_FrameworkShutdownCompletedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueue.frameworkshutdownstarting)
|
||||
public lazy var frameworkShutdownStarting : Event<TypedEventHandler<DispatcherQueue?, DispatcherQueueShutdownStartingEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._IDispatcherQueue3 else { return .init() }
|
||||
return try! this.add_FrameworkShutdownStartingImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._IDispatcherQueue3.remove_FrameworkShutdownStartingImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
_IDispatcherQueue2 = nil
|
||||
_IDispatcherQueue3 = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller)
|
||||
public final class DispatcherQueueController : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Dispatching.IDispatcherQueueController
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueController>?) -> DispatcherQueueController? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
private static let _IDispatcherQueueControllerStatics: __ABI_Microsoft_UI_Dispatching.IDispatcherQueueControllerStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Dispatching.DispatcherQueueController"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.createondedicatedthread)
|
||||
public static func createOnDedicatedThread() -> DispatcherQueueController! {
|
||||
return try! _IDispatcherQueueControllerStatics.CreateOnDedicatedThreadImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.createoncurrentthread)
|
||||
public static func createOnCurrentThread() -> DispatcherQueueController! {
|
||||
return try! _IDispatcherQueueControllerStatics.CreateOnCurrentThreadImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.shutdownqueueasync)
|
||||
public func shutdownQueueAsync() throws -> WindowsFoundation.AnyIAsyncAction! {
|
||||
try _default.ShutdownQueueAsyncImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.dispatcherqueue)
|
||||
public var dispatcherQueue : DispatcherQueue! {
|
||||
get { try! _default.get_DispatcherQueueImpl() }
|
||||
}
|
||||
|
||||
private lazy var _IDispatcherQueueController2: __ABI_Microsoft_UI_Dispatching.IDispatcherQueueController2! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.shutdownqueue)
|
||||
public func shutdownQueue() throws {
|
||||
try _IDispatcherQueueController2.ShutdownQueueImpl()
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
_IDispatcherQueueController2 = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueueshutdownstartingeventargs)
|
||||
public final class DispatcherQueueShutdownStartingEventArgs : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Dispatching.IDispatcherQueueShutdownStartingEventArgs
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueShutdownStartingEventArgs>?) -> DispatcherQueueShutdownStartingEventArgs? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueueshutdownstartingeventargs.getdeferral)
|
||||
public func getDeferral() throws -> WindowsFoundation.Deferral! {
|
||||
try _default.GetDeferralImpl()
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer)
|
||||
public final class DispatcherQueueTimer : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_UI_Dispatching.IDispatcherQueueTimer
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CUI_CDispatching_CIDispatcherQueueTimer>?) -> DispatcherQueueTimer? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer.start)
|
||||
public func start() throws {
|
||||
try _default.StartImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer.stop)
|
||||
public func stop() throws {
|
||||
try _default.StopImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer.interval)
|
||||
public var interval : WindowsFoundation.TimeSpan {
|
||||
get { try! _default.get_IntervalImpl() }
|
||||
set { try! _default.put_IntervalImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer.isrepeating)
|
||||
public var isRepeating : Bool {
|
||||
get { try! _default.get_IsRepeatingImpl() }
|
||||
set { try! _default.put_IsRepeatingImpl(newValue) }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer.isrunning)
|
||||
public var isRunning : Bool {
|
||||
get { try! _default.get_IsRunningImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuetimer.tick)
|
||||
public lazy var tick : Event<TypedEventHandler<DispatcherQueueTimer?, Any?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_TickImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_TickImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
public typealias DispatcherQueueHandler = () -> ()
|
||||
extension WinAppSDK.DispatcherQueuePriority {
|
||||
public static var low : WinAppSDK.DispatcherQueuePriority {
|
||||
__x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherQueuePriority_Low
|
||||
}
|
||||
public static var normal : WinAppSDK.DispatcherQueuePriority {
|
||||
__x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherQueuePriority_Normal
|
||||
}
|
||||
public static var high : WinAppSDK.DispatcherQueuePriority {
|
||||
__x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherQueuePriority_High
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.DispatcherQueuePriority: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
extension WinAppSDK.DispatcherRunOptions {
|
||||
public static var none : WinAppSDK.DispatcherRunOptions {
|
||||
__x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherRunOptions_None
|
||||
}
|
||||
public static var continueOnQuit : WinAppSDK.DispatcherRunOptions {
|
||||
__x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherRunOptions_ContinueOnQuit
|
||||
}
|
||||
public static var quitOnlyLocalLoop : WinAppSDK.DispatcherRunOptions {
|
||||
__x_ABI_CMicrosoft_CUI_CDispatching_CDispatcherRunOptions_QuitOnlyLocalLoop
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.DispatcherRunOptions: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
2722
Sources/WinAppSDK/Microsoft.UI.Input+ABI.swift
Normal file
2722
Sources/WinAppSDK/Microsoft.UI.Input+ABI.swift
Normal file
File diff suppressed because it is too large
Load Diff
48
Sources/WinAppSDK/Microsoft.UI.Input+Impl.swift
Normal file
48
Sources/WinAppSDK/Microsoft.UI.Input+Impl.swift
Normal file
@ -0,0 +1,48 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Input {
|
||||
public enum IPointerPointTransformBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CUI_CInput_CIPointerPointTransform
|
||||
public typealias SwiftABI = __ABI_Microsoft_UI_Input.IPointerPointTransform
|
||||
public typealias SwiftProjection = AnyIPointerPointTransform
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IPointerPointTransformImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_UI_Input.IPointerPointTransformVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IPointerPointTransformImpl: IPointerPointTransform, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IPointerPointTransformBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.input.ipointerpointtransform.trytransform)
|
||||
fileprivate func tryTransform(_ inPoint: WindowsFoundation.Point, _ outPoint: inout WindowsFoundation.Point) throws -> Bool {
|
||||
try _default.TryTransformImpl(inPoint, &outPoint)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.input.ipointerpointtransform.trytransformbounds)
|
||||
fileprivate func tryTransformBounds(_ inRect: WindowsFoundation.Rect, _ outRect: inout WindowsFoundation.Rect) throws -> Bool {
|
||||
try _default.TryTransformBoundsImpl(inRect, &outRect)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.input.ipointerpointtransform.inverse)
|
||||
fileprivate var inverse : AnyIPointerPointTransform! {
|
||||
get { try! _default.get_InverseImpl() }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
3040
Sources/WinAppSDK/Microsoft.UI.Input.swift
Normal file
3040
Sources/WinAppSDK/Microsoft.UI.Input.swift
Normal file
File diff suppressed because it is too large
Load Diff
1270
Sources/WinAppSDK/Microsoft.UI.Windowing+ABI.swift
Normal file
1270
Sources/WinAppSDK/Microsoft.UI.Windowing+ABI.swift
Normal file
File diff suppressed because it is too large
Load Diff
8
Sources/WinAppSDK/Microsoft.UI.Windowing+Impl.swift
Normal file
8
Sources/WinAppSDK/Microsoft.UI.Windowing+Impl.swift
Normal file
@ -0,0 +1,8 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_UI_Windowing {
|
||||
}
|
||||
1026
Sources/WinAppSDK/Microsoft.UI.Windowing.swift
Normal file
1026
Sources/WinAppSDK/Microsoft.UI.Windowing.swift
Normal file
File diff suppressed because it is too large
Load Diff
76
Sources/WinAppSDK/Microsoft.UI.swift
Normal file
76
Sources/WinAppSDK/Microsoft.UI.swift
Normal file
@ -0,0 +1,76 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public typealias ClosableNotifierHandler = () -> ()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.displayid)
|
||||
public struct DisplayId: Hashable, Codable {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.displayid.value)
|
||||
public var value: UInt64 = 0
|
||||
public init() {}
|
||||
public init(value: UInt64) {
|
||||
self.value = value
|
||||
}
|
||||
public static func from(abi: __x_ABI_CMicrosoft_CUI_CDisplayId) -> DisplayId {
|
||||
.init(value: abi.Value)
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iconid)
|
||||
public struct IconId: Hashable, Codable {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iconid.value)
|
||||
public var value: UInt64 = 0
|
||||
public init() {}
|
||||
public init(value: UInt64) {
|
||||
self.value = value
|
||||
}
|
||||
public static func from(abi: __x_ABI_CMicrosoft_CUI_CIconId) -> IconId {
|
||||
.init(value: abi.Value)
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.windowid)
|
||||
public struct WindowId: Hashable, Codable {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.windowid.value)
|
||||
public var value: UInt64 = 0
|
||||
public init() {}
|
||||
public init(value: UInt64) {
|
||||
self.value = value
|
||||
}
|
||||
public static func from(abi: __x_ABI_CMicrosoft_CUI_CWindowId) -> WindowId {
|
||||
.init(value: abi.Value)
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier)
|
||||
public protocol IClosableNotifier : WinRTInterface {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier.isclosed)
|
||||
var isClosed: Bool { get }
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier.closed)
|
||||
var closed: Event<ClosableNotifierHandler> { get }
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.iclosablenotifier.frameworkclosed)
|
||||
var frameworkClosed: Event<ClosableNotifierHandler> { get }
|
||||
}
|
||||
|
||||
public extension EventSource where Handler == ClosableNotifierHandler {
|
||||
func invoke() {
|
||||
for handler in getInvocationList() {
|
||||
handler()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension IClosableNotifier {
|
||||
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
switch iid {
|
||||
case __ABI_Microsoft_UI.IClosableNotifierWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_UI.IClosableNotifierWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
public typealias AnyIClosableNotifier = any IClosableNotifier
|
||||
|
||||
205
Sources/WinAppSDK/Microsoft.Windows.AppLifecycle+ABI.swift
Normal file
205
Sources/WinAppSDK/Microsoft.Windows.AppLifecycle+ABI.swift
Normal file
@ -0,0 +1,205 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIActivationRegistrationManagerStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0x5AC4E92E, Data2: 0x017B, Data3: 0x5D68, Data4: ( 0x81,0x98,0xF6,0x86,0x36,0xAB,0x99,0xD3 ))// 5AC4E92E-017B-5D68-8198-F68636AB99D3
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppActivationArguments: WindowsFoundation.IID {
|
||||
.init(Data1: 0x14F99EAF, Data2: 0x1580, Data3: 0x5062, Data4: ( 0xBD,0xC8,0xD5,0xD1,0xC3,0x11,0x38,0xFB ))// 14F99EAF-1580-5062-BDC8-D5D1C31138FB
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance: WindowsFoundation.IID {
|
||||
.init(Data1: 0x75766AE4, Data2: 0x0239, Data3: 0x5A26, Data4: ( 0xB9,0xDA,0xD5,0xBF,0xC7,0x5A,0x48,0x66 ))// 75766AE4-0239-5A26-B9DA-D5BFC75A4866
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics: WindowsFoundation.IID {
|
||||
.init(Data1: 0x4F414B25, Data2: 0x8330, Data3: 0x5A9B, Data4: ( 0xBB,0xC1,0x82,0x29,0xD4,0x79,0x64,0x9D ))// 4F414B25-8330-5A9B-BBC1-8229D479649D
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics2: WindowsFoundation.IID {
|
||||
.init(Data1: 0xFE9F1885, Data2: 0x7160, Data3: 0x5397, Data4: ( 0xBA,0x9B,0x58,0x90,0xB2,0x4F,0xDC,0x04 ))// FE9F1885-7160-5397-BA9B-5890B24FDC04
|
||||
}
|
||||
|
||||
public enum __ABI_Microsoft_Windows_AppLifecycle {
|
||||
public class IActivationRegistrationManagerStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIActivationRegistrationManagerStatics }
|
||||
|
||||
internal func RegisterForProtocolActivationImpl(_ scheme: String, _ logo: String, _ displayName: String, _ exePath: String) throws {
|
||||
let _scheme = try! HString(scheme)
|
||||
let _logo = try! HString(logo)
|
||||
let _displayName = try! HString(displayName)
|
||||
let _exePath = try! HString(exePath)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIActivationRegistrationManagerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RegisterForProtocolActivation(pThis, _scheme.get(), _logo.get(), _displayName.get(), _exePath.get()))
|
||||
}
|
||||
}
|
||||
|
||||
internal func RegisterForStartupActivationImpl(_ taskId: String, _ exePath: String) throws {
|
||||
let _taskId = try! HString(taskId)
|
||||
let _exePath = try! HString(exePath)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIActivationRegistrationManagerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RegisterForStartupActivation(pThis, _taskId.get(), _exePath.get()))
|
||||
}
|
||||
}
|
||||
|
||||
internal func UnregisterForProtocolActivationImpl(_ scheme: String, _ exePath: String) throws {
|
||||
let _scheme = try! HString(scheme)
|
||||
let _exePath = try! HString(exePath)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIActivationRegistrationManagerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.UnregisterForProtocolActivation(pThis, _scheme.get(), _exePath.get()))
|
||||
}
|
||||
}
|
||||
|
||||
internal func UnregisterForStartupActivationImpl(_ taskId: String) throws {
|
||||
let _taskId = try! HString(taskId)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIActivationRegistrationManagerStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.UnregisterForStartupActivation(pThis, _taskId.get()))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IAppActivationArguments: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppActivationArguments }
|
||||
|
||||
internal func get_KindImpl() throws -> WinAppSDK.ExtendedActivationKind {
|
||||
var value: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppActivationArguments.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func get_DataImpl() throws -> Any? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppActivationArguments.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Data(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_.AnyWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IAppInstance: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance }
|
||||
|
||||
internal func UnregisterKeyImpl() throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.UnregisterKey(pThis))
|
||||
}
|
||||
}
|
||||
|
||||
internal func RedirectActivationToAsyncImpl(_ args: WinAppSDK.AppActivationArguments?) throws -> WindowsFoundation.AnyIAsyncAction? {
|
||||
let (operation) = try ComPtrs.initialize { operationAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.RedirectActivationToAsync(pThis, RawPointer(args), &operationAbi))
|
||||
}
|
||||
}
|
||||
return __ABI_Windows_Foundation.IAsyncActionWrapper.unwrapFrom(abi: operation)
|
||||
}
|
||||
|
||||
internal func GetActivatedEventArgsImpl() throws -> WinAppSDK.AppActivationArguments? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetActivatedEventArgs(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func add_ActivatedImpl(_ handler: EventHandler<WinAppSDK.AppActivationArguments?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FIEventHandler_1___x_ABI_CMicrosoft__CWindows__CAppLifecycle__CAppActivationArgumentsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_Activated(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
internal func remove_ActivatedImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_Activated(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
internal func get_KeyImpl() throws -> String {
|
||||
var value: HSTRING?
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Key(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_IsCurrentImpl() throws -> Bool {
|
||||
var value: boolean = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_IsCurrent(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_ProcessIdImpl() throws -> UInt32 {
|
||||
var value: UINT32 = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ProcessId(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IAppInstanceStatics: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics }
|
||||
|
||||
internal func GetCurrentImpl() throws -> WinAppSDK.AppInstance? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetCurrent(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func GetInstancesImpl() throws -> WindowsFoundation.AnyIVector<WinAppSDK.AppInstance?>? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetInstances(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIVector_1___x_ABI_CMicrosoft__CWindows__CAppLifecycle__CAppInstanceWrapper.unwrapFrom(abi: result)
|
||||
}
|
||||
|
||||
internal func FindOrRegisterForKeyImpl(_ key: String) throws -> WinAppSDK.AppInstance? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _key = try! HString(key)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.FindOrRegisterForKey(pThis, _key.get(), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IAppInstanceStatics2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics2 }
|
||||
|
||||
internal func RestartImpl(_ arguments: String) throws -> UWP.AppRestartFailureReason {
|
||||
var result: __x_ABI_CWindows_CApplicationModel_CCore_CAppRestartFailureReason = .init(0)
|
||||
let _arguments = try! HString(arguments)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstanceStatics2.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.Restart(pThis, _arguments.get(), &result))
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,8 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_Windows_AppLifecycle {
|
||||
}
|
||||
309
Sources/WinAppSDK/Microsoft.Windows.AppLifecycle.swift
Normal file
309
Sources/WinAppSDK/Microsoft.Windows.AppLifecycle.swift
Normal file
@ -0,0 +1,309 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import UWP
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.extendedactivationkind)
|
||||
public typealias ExtendedActivationKind = __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.activationregistrationmanager)
|
||||
public final class ActivationRegistrationManager {
|
||||
private static let _IActivationRegistrationManagerStatics: __ABI_Microsoft_Windows_AppLifecycle.IActivationRegistrationManagerStatics = try! RoGetActivationFactory(HString("Microsoft.Windows.AppLifecycle.ActivationRegistrationManager"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.activationregistrationmanager.registerforprotocolactivation)
|
||||
public static func registerForProtocolActivation(_ scheme: String, _ logo: String, _ displayName: String, _ exePath: String) {
|
||||
try! _IActivationRegistrationManagerStatics.RegisterForProtocolActivationImpl(scheme, logo, displayName, exePath)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.activationregistrationmanager.registerforstartupactivation)
|
||||
public static func registerForStartupActivation(_ taskId: String, _ exePath: String) {
|
||||
try! _IActivationRegistrationManagerStatics.RegisterForStartupActivationImpl(taskId, exePath)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.activationregistrationmanager.unregisterforprotocolactivation)
|
||||
public static func unregisterForProtocolActivation(_ scheme: String, _ exePath: String) {
|
||||
try! _IActivationRegistrationManagerStatics.UnregisterForProtocolActivationImpl(scheme, exePath)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.activationregistrationmanager.unregisterforstartupactivation)
|
||||
public static func unregisterForStartupActivation(_ taskId: String) {
|
||||
try! _IActivationRegistrationManagerStatics.UnregisterForStartupActivationImpl(taskId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appactivationarguments)
|
||||
public final class AppActivationArguments : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_AppLifecycle.IAppActivationArguments
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppActivationArguments
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppActivationArguments>?) -> AppActivationArguments? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appactivationarguments.data)
|
||||
public var data : Any! {
|
||||
get { try! _default.get_DataImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appactivationarguments.kind)
|
||||
public var kind : ExtendedActivationKind {
|
||||
get { try! _default.get_KindImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance)
|
||||
public final class AppInstance : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_AppLifecycle.IAppInstance
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CIAppInstance>?) -> AppInstance? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
private static let _IAppInstanceStatics: __ABI_Microsoft_Windows_AppLifecycle.IAppInstanceStatics = try! RoGetActivationFactory(HString("Microsoft.Windows.AppLifecycle.AppInstance"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.getcurrent)
|
||||
public static func getCurrent() -> AppInstance! {
|
||||
return try! _IAppInstanceStatics.GetCurrentImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.getinstances)
|
||||
public static func getInstances() -> WindowsFoundation.AnyIVector<AppInstance?>! {
|
||||
return try! _IAppInstanceStatics.GetInstancesImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.findorregisterforkey)
|
||||
public static func findOrRegisterForKey(_ key: String) -> AppInstance! {
|
||||
return try! _IAppInstanceStatics.FindOrRegisterForKeyImpl(key)
|
||||
}
|
||||
|
||||
private static let _IAppInstanceStatics2: __ABI_Microsoft_Windows_AppLifecycle.IAppInstanceStatics2 = try! RoGetActivationFactory(HString("Microsoft.Windows.AppLifecycle.AppInstance"))
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.restart)
|
||||
public static func restart(_ arguments: String) -> UWP.AppRestartFailureReason {
|
||||
return try! _IAppInstanceStatics2.RestartImpl(arguments)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.unregisterkey)
|
||||
public func unregisterKey() throws {
|
||||
try _default.UnregisterKeyImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.redirectactivationtoasync)
|
||||
public func redirectActivationToAsync(_ args: AppActivationArguments!) throws -> WindowsFoundation.AnyIAsyncAction! {
|
||||
try _default.RedirectActivationToAsyncImpl(args)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.getactivatedeventargs)
|
||||
public func getActivatedEventArgs() throws -> AppActivationArguments! {
|
||||
try _default.GetActivatedEventArgsImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.iscurrent)
|
||||
public var isCurrent : Bool {
|
||||
get { try! _default.get_IsCurrentImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.key)
|
||||
public var key : String {
|
||||
get { try! _default.get_KeyImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.processid)
|
||||
public var processId : UInt32 {
|
||||
get { try! _default.get_ProcessIdImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applifecycle.appinstance.activated)
|
||||
public lazy var activated : Event<EventHandler<AppActivationArguments?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_ActivatedImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_ActivatedImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
extension WinAppSDK.ExtendedActivationKind {
|
||||
public static var launch : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Launch
|
||||
}
|
||||
public static var search : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Search
|
||||
}
|
||||
public static var shareTarget : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_ShareTarget
|
||||
}
|
||||
public static var file : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_File
|
||||
}
|
||||
public static var `protocol` : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Protocol
|
||||
}
|
||||
public static var fileOpenPicker : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_FileOpenPicker
|
||||
}
|
||||
public static var fileSavePicker : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_FileSavePicker
|
||||
}
|
||||
public static var cachedFileUpdater : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_CachedFileUpdater
|
||||
}
|
||||
public static var contactPicker : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_ContactPicker
|
||||
}
|
||||
public static var device : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Device
|
||||
}
|
||||
public static var printTaskSettings : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PrintTaskSettings
|
||||
}
|
||||
public static var cameraSettings : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_CameraSettings
|
||||
}
|
||||
public static var restrictedLaunch : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_RestrictedLaunch
|
||||
}
|
||||
public static var appointmentsProvider : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_AppointmentsProvider
|
||||
}
|
||||
public static var contact : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Contact
|
||||
}
|
||||
public static var lockScreenCall : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_LockScreenCall
|
||||
}
|
||||
public static var voiceCommand : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_VoiceCommand
|
||||
}
|
||||
public static var lockScreen : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_LockScreen
|
||||
}
|
||||
public static var pickerReturned : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PickerReturned
|
||||
}
|
||||
public static var walletAction : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_WalletAction
|
||||
}
|
||||
public static var pickFileContinuation : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PickFileContinuation
|
||||
}
|
||||
public static var pickSaveFileContinuation : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PickSaveFileContinuation
|
||||
}
|
||||
public static var pickFolderContinuation : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PickFolderContinuation
|
||||
}
|
||||
public static var webAuthenticationBrokerContinuation : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_WebAuthenticationBrokerContinuation
|
||||
}
|
||||
public static var webAccountProvider : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_WebAccountProvider
|
||||
}
|
||||
public static var componentUI : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_ComponentUI
|
||||
}
|
||||
public static var protocolForResults : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_ProtocolForResults
|
||||
}
|
||||
public static var toastNotification : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_ToastNotification
|
||||
}
|
||||
public static var print3DWorkflow : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Print3DWorkflow
|
||||
}
|
||||
public static var dialReceiver : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_DialReceiver
|
||||
}
|
||||
public static var devicePairing : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_DevicePairing
|
||||
}
|
||||
public static var userDataAccountsProvider : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_UserDataAccountsProvider
|
||||
}
|
||||
public static var filePickerExperience : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_FilePickerExperience
|
||||
}
|
||||
public static var lockScreenComponent : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_LockScreenComponent
|
||||
}
|
||||
public static var contactPanel : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_ContactPanel
|
||||
}
|
||||
public static var printWorkflowForegroundTask : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PrintWorkflowForegroundTask
|
||||
}
|
||||
public static var gameUIProvider : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_GameUIProvider
|
||||
}
|
||||
public static var startupTask : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_StartupTask
|
||||
}
|
||||
public static var commandLineLaunch : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_CommandLineLaunch
|
||||
}
|
||||
public static var barcodeScannerProvider : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_BarcodeScannerProvider
|
||||
}
|
||||
public static var printSupportJobUI : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PrintSupportJobUI
|
||||
}
|
||||
public static var printSupportSettingsUI : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PrintSupportSettingsUI
|
||||
}
|
||||
public static var phoneCallActivation : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_PhoneCallActivation
|
||||
}
|
||||
public static var vpnForeground : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_VpnForeground
|
||||
}
|
||||
public static var push : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_Push
|
||||
}
|
||||
public static var appNotification : WinAppSDK.ExtendedActivationKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CAppLifecycle_CExtendedActivationKind_AppNotification
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.ExtendedActivationKind: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
@ -0,0 +1,385 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate: WindowsFoundation.IID {
|
||||
.init(Data1: 0x6C54BC0C, Data2: 0xEF1E, Data3: 0x57B8, Data4: ( 0xB4,0x78,0x34,0xFE,0xCE,0x73,0x73,0x56 ))// 6C54BC0C-EF1E-57B8-B478-34FECE737356
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidateFactory: WindowsFoundation.IID {
|
||||
.init(Data1: 0xBB2B30F8, Data2: 0xC19B, Data3: 0x5F43, Data4: ( 0x88,0xD9,0x69,0xAD,0x72,0x8A,0x32,0xF4 ))// BB2B30F8-C19B-5F43-88D9-69AD728A32F4
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext: WindowsFoundation.IID {
|
||||
.init(Data1: 0x96FB48DC, Data2: 0xF77D, Data3: 0x55FF, Data4: ( 0xAF,0x12,0x34,0x86,0x1E,0x3D,0x49,0x39 ))// 96FB48DC-F77D-55FF-AF12-34861E3D4939
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext2: WindowsFoundation.IID {
|
||||
.init(Data1: 0x7A3B1158, Data2: 0x798C, Data3: 0x5949, Data4: ( 0x96,0x9D,0x03,0x51,0x0B,0x9C,0xE6,0xCA ))// 7A3B1158-798C-5949-969D-03510B9CE6CA
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager: WindowsFoundation.IID {
|
||||
.init(Data1: 0xAC2291EF, Data2: 0x81BE, Data3: 0x5C99, Data4: ( 0xA0,0xAE,0xBC,0xEE,0x01,0x80,0xB8,0xA8 ))// AC2291EF-81BE-5C99-A0AE-BCEE0180B8A8
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager2: WindowsFoundation.IID {
|
||||
.init(Data1: 0x7EC10160, Data2: 0xA154, Data3: 0x5C42, Data4: ( 0x82,0x68,0x30,0xE3,0x06,0xB1,0xF5,0x85 ))// 7EC10160-A154-5C42-8268-30E306B1F585
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerFactory: WindowsFoundation.IID {
|
||||
.init(Data1: 0xD6ACF18F, Data2: 0x458A, Data3: 0x535B, Data4: ( 0xA5,0xC4,0xAC,0x2D,0xC4,0xE4,0x90,0x99 ))// D6ACF18F-458A-535B-A5C4-AC2DC4E49099
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap: WindowsFoundation.IID {
|
||||
.init(Data1: 0x4ABBD9BC, Data2: 0xDF4E, Data3: 0x5C7B, Data4: ( 0x81,0x2C,0x7E,0x7B,0xB0,0xC2,0x23,0x77 ))// 4ABBD9BC-DF4E-5C7B-812C-7E7BB0C22377
|
||||
}
|
||||
|
||||
private var IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs: WindowsFoundation.IID {
|
||||
.init(Data1: 0x64ABB08B, Data2: 0xE77D, Data3: 0x5B26, Data4: ( 0x83,0x0F,0x15,0x94,0x1E,0x0E,0x82,0x00 ))// 64ABB08B-E77D-5B26-830F-15941E0E8200
|
||||
}
|
||||
|
||||
public enum __ABI_Microsoft_Windows_ApplicationModel_Resources {
|
||||
public class IResourceCandidate: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate }
|
||||
|
||||
internal func get_ValueAsStringImpl() throws -> String {
|
||||
var value: HSTRING?
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ValueAsString(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func get_KindImpl() throws -> WinAppSDK.ResourceCandidateKind {
|
||||
var value: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind = .init(0)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Kind(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func get_QualifierValuesImpl() throws -> WindowsFoundation.AnyIMapView<String, String>? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_QualifierValues(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIMapView_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IResourceCandidateFactory: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidateFactory }
|
||||
|
||||
internal func CreateInstanceImpl(_ kind: WinAppSDK.ResourceCandidateKind, _ data: String) throws -> IResourceCandidate {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
let _data = try! HString(data)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidateFactory.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateInstance(pThis, kind, _data.get(), &valueAbi))
|
||||
}
|
||||
}
|
||||
return IResourceCandidate(value!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IResourceContext: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext }
|
||||
|
||||
open func get_QualifierValuesImpl() throws -> WindowsFoundation.AnyIMap<String, String>? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_QualifierValues(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper.unwrapFrom(abi: value)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static var IResourceContextVTable: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContextVtbl = .init(
|
||||
QueryInterface: { IResourceContextWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { IResourceContextWrapper.addRef($0) },
|
||||
Release: { IResourceContextWrapper.release($0) },
|
||||
GetIids: {
|
||||
let size = MemoryLayout<WindowsFoundation.IID>.size
|
||||
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
||||
iids[0] = IUnknown.IID
|
||||
iids[1] = IInspectable.IID
|
||||
iids[2] = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContextWrapper.IID
|
||||
$1!.pointee = 3
|
||||
$2!.pointee = iids
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetRuntimeClassName: {
|
||||
_ = $0
|
||||
let hstring = try! HString("Microsoft.Windows.ApplicationModel.Resources.IResourceContext").detach()
|
||||
$1!.pointee = hstring
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetTrustLevel: {
|
||||
_ = $0
|
||||
$1!.pointee = TrustLevel(rawValue: 0)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_QualifierValues: {
|
||||
guard let __unwrapped__instance = IResourceContextWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.qualifierValues
|
||||
let valueWrapper = WinAppSDK.__x_ABI_C__FIMap_2_HSTRING_HSTRINGWrapper(value)
|
||||
valueWrapper?.copyTo($1)
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
|
||||
public typealias IResourceContextWrapper = InterfaceWrapperBase<__IMPL_Microsoft_Windows_ApplicationModel_Resources.IResourceContextBridge>
|
||||
public class IResourceContext2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext2 }
|
||||
|
||||
}
|
||||
|
||||
public class IResourceManager: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager }
|
||||
|
||||
open func get_MainResourceMapImpl() throws -> WinAppSDK.ResourceMap? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_MainResourceMap(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
open func CreateResourceContextImpl() throws -> WinAppSDK.ResourceContext? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateResourceContext(pThis, &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
open func add_ResourceNotFoundImpl(_ handler: TypedEventHandler<WinAppSDK.ResourceManager?, WinAppSDK.ResourceNotFoundEventArgs?>?) throws -> EventRegistrationToken {
|
||||
var token: EventRegistrationToken = .init()
|
||||
let handlerWrapper = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceManager___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceNotFoundEventArgsWrapper(handler)
|
||||
let _handler = try! handlerWrapper?.toABI { $0 }
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.add_ResourceNotFound(pThis, _handler, &token))
|
||||
}
|
||||
return token
|
||||
}
|
||||
|
||||
open func remove_ResourceNotFoundImpl(_ token: EventRegistrationToken) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.remove_ResourceNotFound(pThis, token))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static var IResourceManagerVTable: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerVtbl = .init(
|
||||
QueryInterface: { IResourceManagerWrapper.queryInterface($0, $1, $2) },
|
||||
AddRef: { IResourceManagerWrapper.addRef($0) },
|
||||
Release: { IResourceManagerWrapper.release($0) },
|
||||
GetIids: {
|
||||
let size = MemoryLayout<WindowsFoundation.IID>.size
|
||||
let iids = CoTaskMemAlloc(UInt64(size) * 3).assumingMemoryBound(to: WindowsFoundation.IID.self)
|
||||
iids[0] = IUnknown.IID
|
||||
iids[1] = IInspectable.IID
|
||||
iids[2] = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerWrapper.IID
|
||||
$1!.pointee = 3
|
||||
$2!.pointee = iids
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetRuntimeClassName: {
|
||||
_ = $0
|
||||
let hstring = try! HString("Microsoft.Windows.ApplicationModel.Resources.IResourceManager").detach()
|
||||
$1!.pointee = hstring
|
||||
return S_OK
|
||||
},
|
||||
|
||||
GetTrustLevel: {
|
||||
_ = $0
|
||||
$1!.pointee = TrustLevel(rawValue: 0)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
get_MainResourceMap: {
|
||||
guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let value = __unwrapped__instance.mainResourceMap
|
||||
value?.copyTo($1)
|
||||
return S_OK
|
||||
},
|
||||
|
||||
CreateResourceContext: {
|
||||
do {
|
||||
guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let result = try __unwrapped__instance.createResourceContext()
|
||||
result?.copyTo($1)
|
||||
return S_OK
|
||||
} catch { return failWith(err: E_FAIL) }
|
||||
},
|
||||
|
||||
add_ResourceNotFound: {
|
||||
guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
guard let handler = WinAppSDK.__x_ABI_C__FITypedEventHandler_2___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceManager___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceNotFoundEventArgsWrapper.unwrapFrom(abi: ComPtr($1)) else { return E_INVALIDARG }
|
||||
let token = __unwrapped__instance.resourceNotFound.addHandler(handler)
|
||||
$2?.initialize(to: .from(swift: token))
|
||||
return S_OK
|
||||
},
|
||||
|
||||
remove_ResourceNotFound: {
|
||||
guard let __unwrapped__instance = IResourceManagerWrapper.tryUnwrapFrom(raw: $0) else { return E_INVALIDARG }
|
||||
let token: EventRegistrationToken = $1
|
||||
__unwrapped__instance.resourceNotFound.removeHandler(token)
|
||||
return S_OK
|
||||
}
|
||||
)
|
||||
|
||||
public typealias IResourceManagerWrapper = InterfaceWrapperBase<__IMPL_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerBridge>
|
||||
public class IResourceManager2: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager2 }
|
||||
|
||||
}
|
||||
|
||||
public class IResourceManagerFactory: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerFactory }
|
||||
|
||||
internal func CreateInstanceImpl(_ fileName: String) throws -> IResourceManager {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
let _fileName = try! HString(fileName)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManagerFactory.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.CreateInstance(pThis, _fileName.get(), &valueAbi))
|
||||
}
|
||||
}
|
||||
return IResourceManager(value!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IResourceMap: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap }
|
||||
|
||||
internal func get_ResourceCountImpl() throws -> UInt32 {
|
||||
var value: UINT32 = 0
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_ResourceCount(pThis, &value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
internal func GetSubtreeImpl(_ reference: String) throws -> WinAppSDK.ResourceMap? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _reference = try! HString(reference)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetSubtree(pThis, _reference.get(), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func TryGetSubtreeImpl(_ reference: String) throws -> WinAppSDK.ResourceMap? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _reference = try! HString(reference)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetSubtree(pThis, _reference.get(), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func GetValueImpl(_ resource: String) throws -> WinAppSDK.ResourceCandidate? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _resource = try! HString(resource)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetValue(pThis, _resource.get(), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func GetValueWithContextImpl(_ resource: String, _ context: WinAppSDK.ResourceContext?) throws -> WinAppSDK.ResourceCandidate? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _resource = try! HString(resource)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetValueWithContext(pThis, _resource.get(), RawPointer(context), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func GetValueByIndexImpl(_ index: UInt32) throws -> WindowsFoundation.AnyIKeyValuePair<String, WinAppSDK.ResourceCandidate?>? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetValueByIndex(pThis, index, &resultAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceCandidateWrapper.unwrapFrom(abi: result)
|
||||
}
|
||||
|
||||
internal func GetValueByIndexWithContextImpl(_ index: UInt32, _ context: WinAppSDK.ResourceContext?) throws -> WindowsFoundation.AnyIKeyValuePair<String, WinAppSDK.ResourceCandidate?>? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.GetValueByIndexWithContext(pThis, index, RawPointer(context), &resultAbi))
|
||||
}
|
||||
}
|
||||
return WinAppSDK.__x_ABI_C__FIKeyValuePair_2_HSTRING___x_ABI_CMicrosoft__CWindows__CApplicationModel__CResources__CResourceCandidateWrapper.unwrapFrom(abi: result)
|
||||
}
|
||||
|
||||
internal func TryGetValueImpl(_ resource: String) throws -> WinAppSDK.ResourceCandidate? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _resource = try! HString(resource)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetValue(pThis, _resource.get(), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
internal func TryGetValueWithContextImpl(_ resource: String, _ context: WinAppSDK.ResourceContext?) throws -> WinAppSDK.ResourceCandidate? {
|
||||
let (result) = try ComPtrs.initialize { resultAbi in
|
||||
let _resource = try! HString(resource)
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.TryGetValueWithContext(pThis, _resource.get(), RawPointer(context), &resultAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: result)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class IResourceNotFoundEventArgs: WindowsFoundation.IInspectable {
|
||||
override public class var IID: WindowsFoundation.IID { IID___x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs }
|
||||
|
||||
internal func get_ContextImpl() throws -> WinAppSDK.ResourceContext? {
|
||||
let (value) = try ComPtrs.initialize { valueAbi in
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Context(pThis, &valueAbi))
|
||||
}
|
||||
}
|
||||
return .from(abi: value)
|
||||
}
|
||||
|
||||
internal func get_NameImpl() throws -> String {
|
||||
var value: HSTRING?
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.get_Name(pThis, &value))
|
||||
}
|
||||
return .init(from: value)
|
||||
}
|
||||
|
||||
internal func SetResolvedCandidateImpl(_ candidate: WinAppSDK.ResourceCandidate?) throws {
|
||||
_ = try perform(as: __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs.self) { pThis in
|
||||
try CHECKED(pThis.pointee.lpVtbl.pointee.SetResolvedCandidate(pThis, RawPointer(candidate)))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
public enum __IMPL_Microsoft_Windows_ApplicationModel_Resources {
|
||||
public enum IResourceContextBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext
|
||||
public typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContext
|
||||
public typealias SwiftProjection = AnyIResourceContext
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IResourceContextImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContextVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IResourceContextImpl: IResourceContext, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IResourceContextBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcecontext.qualifiervalues)
|
||||
fileprivate var qualifierValues : WindowsFoundation.AnyIMap<String, String>! {
|
||||
get { try! _default.get_QualifierValuesImpl() }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum IResourceManagerBridge : AbiInterfaceBridge {
|
||||
public typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager
|
||||
public typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManager
|
||||
public typealias SwiftProjection = AnyIResourceManager
|
||||
public static func from(abi: ComPtr<CABI>?) -> SwiftProjection? {
|
||||
guard let abi = abi else { return nil }
|
||||
return IResourceManagerImpl(abi)
|
||||
}
|
||||
|
||||
public static func makeAbi() -> CABI {
|
||||
let vtblPtr = withUnsafeMutablePointer(to: &__ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerVTable) { $0 }
|
||||
return .init(lpVtbl: vtblPtr)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class IResourceManagerImpl: IResourceManager, WinRTAbiImpl {
|
||||
fileprivate typealias Bridge = IResourceManagerBridge
|
||||
fileprivate let _default: Bridge.SwiftABI
|
||||
fileprivate var thisPtr: WindowsFoundation.IInspectable { _default }
|
||||
fileprivate init(_ fromAbi: ComPtr<Bridge.CABI>) {
|
||||
_default = Bridge.SwiftABI(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.createresourcecontext)
|
||||
fileprivate func createResourceContext() throws -> ResourceContext! {
|
||||
try _default.CreateResourceContextImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.mainresourcemap)
|
||||
fileprivate var mainResourceMap : ResourceMap! {
|
||||
get { try! _default.get_MainResourceMapImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.resourcenotfound)
|
||||
fileprivate lazy var resourceNotFound : Event<TypedEventHandler<ResourceManager?, ResourceNotFoundEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_ResourceNotFoundImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_ResourceNotFoundImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,336 @@
|
||||
// WARNING: Please don't edit this file. It was generated by Swift/WinRT v0.0.1
|
||||
// swiftlint:disable all
|
||||
import Foundation
|
||||
@_spi(WinRTInternal) @_spi(WinRTImplements) import WindowsFoundation
|
||||
import CWinRT
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecandidatekind)
|
||||
public typealias ResourceCandidateKind = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecandidate)
|
||||
public final class ResourceCandidate : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceCandidate
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceCandidate>?) -> ResourceCandidate? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
private static let _IResourceCandidateFactory: __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceCandidateFactory = try! RoGetActivationFactory(HString("Microsoft.Windows.ApplicationModel.Resources.ResourceCandidate"))
|
||||
public init(_ kind: ResourceCandidateKind, _ data: String) {
|
||||
super.init(try! Self._IResourceCandidateFactory.CreateInstanceImpl(kind, data))
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecandidate.kind)
|
||||
public var kind : ResourceCandidateKind {
|
||||
get { try! _default.get_KindImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecandidate.qualifiervalues)
|
||||
public var qualifierValues : WindowsFoundation.AnyIMapView<String, String>! {
|
||||
get { try! _default.get_QualifierValuesImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecandidate.valueasstring)
|
||||
public var valueAsString : String {
|
||||
get { try! _default.get_ValueAsStringImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecontext)
|
||||
public final class ResourceContext : WinRTClass, IResourceContext {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContext
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceContext>?) -> ResourceContext? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
override public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
private lazy var _IResourceContext2: __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContext2! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcecontext.qualifiervalues)
|
||||
public var qualifierValues : WindowsFoundation.AnyIMap<String, String>! {
|
||||
get { try! _default.get_QualifierValuesImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_IResourceContext2 = nil
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemanager)
|
||||
public final class ResourceManager : WinRTClass, IResourceManager {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManager
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceManager>?) -> ResourceManager? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
override public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
return super.queryInterface(iid)
|
||||
}
|
||||
override public init() {
|
||||
super.init(try! RoActivateInstance(HString("Microsoft.Windows.ApplicationModel.Resources.ResourceManager")))
|
||||
}
|
||||
|
||||
private static let _IResourceManagerFactory: __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerFactory = try! RoGetActivationFactory(HString("Microsoft.Windows.ApplicationModel.Resources.ResourceManager"))
|
||||
public init(_ fileName: String) {
|
||||
super.init(try! Self._IResourceManagerFactory.CreateInstanceImpl(fileName))
|
||||
}
|
||||
|
||||
private lazy var _IResourceManager2: __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManager2! = getInterfaceForCaching()
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemanager.createresourcecontext)
|
||||
public func createResourceContext() throws -> ResourceContext! {
|
||||
try _default.CreateResourceContextImpl()
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemanager.mainresourcemap)
|
||||
public var mainResourceMap : ResourceMap! {
|
||||
get { try! _default.get_MainResourceMapImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemanager.resourcenotfound)
|
||||
public lazy var resourceNotFound : Event<TypedEventHandler<ResourceManager?, ResourceNotFoundEventArgs?>> = {
|
||||
.init(
|
||||
add: { [weak self] in
|
||||
guard let this = self?._default else { return .init() }
|
||||
return try! this.add_ResourceNotFoundImpl($0)
|
||||
},
|
||||
remove: { [weak self] in
|
||||
try? self?._default.remove_ResourceNotFoundImpl($0)
|
||||
}
|
||||
)
|
||||
}()
|
||||
|
||||
deinit {
|
||||
_IResourceManager2 = nil
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap)
|
||||
public final class ResourceMap : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceMap
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceMap>?) -> ResourceMap? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.getsubtree)
|
||||
public func getSubtree(_ reference: String) throws -> ResourceMap! {
|
||||
try _default.GetSubtreeImpl(reference)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.trygetsubtree)
|
||||
public func tryGetSubtree(_ reference: String) throws -> ResourceMap! {
|
||||
try _default.TryGetSubtreeImpl(reference)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.getvalue)
|
||||
public func getValue(_ resource: String) throws -> ResourceCandidate! {
|
||||
try _default.GetValueImpl(resource)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.getvalue)
|
||||
public func getValue(_ resource: String, _ context: ResourceContext!) throws -> ResourceCandidate! {
|
||||
try _default.GetValueWithContextImpl(resource, context)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.getvaluebyindex)
|
||||
public func getValueByIndex(_ index: UInt32) throws -> WindowsFoundation.AnyIKeyValuePair<String, ResourceCandidate?>! {
|
||||
try _default.GetValueByIndexImpl(index)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.getvaluebyindex)
|
||||
public func getValueByIndex(_ index: UInt32, _ context: ResourceContext!) throws -> WindowsFoundation.AnyIKeyValuePair<String, ResourceCandidate?>! {
|
||||
try _default.GetValueByIndexWithContextImpl(index, context)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.trygetvalue)
|
||||
public func tryGetValue(_ resource: String) throws -> ResourceCandidate! {
|
||||
try _default.TryGetValueImpl(resource)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.trygetvalue)
|
||||
public func tryGetValue(_ resource: String, _ context: ResourceContext!) throws -> ResourceCandidate! {
|
||||
try _default.TryGetValueWithContextImpl(resource, context)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcemap.resourcecount)
|
||||
public var resourceCount : UInt32 {
|
||||
get { try! _default.get_ResourceCountImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcenotfoundeventargs)
|
||||
public final class ResourceNotFoundEventArgs : WinRTClass {
|
||||
private typealias SwiftABI = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceNotFoundEventArgs
|
||||
private typealias CABI = __x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs
|
||||
private lazy var _default: SwiftABI! = getInterfaceForCaching()
|
||||
@_spi(WinRTInternal)
|
||||
override public func _getABI<T>() -> UnsafeMutablePointer<T>? {
|
||||
if T.self == CABI.self {
|
||||
return RawPointer(_default)
|
||||
}
|
||||
return super._getABI()
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public static func from(abi: ComPtr<__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CIResourceNotFoundEventArgs>?) -> ResourceNotFoundEventArgs? {
|
||||
guard let abi = abi else { return nil }
|
||||
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
|
||||
}
|
||||
|
||||
@_spi(WinRTInternal)
|
||||
public init(fromAbi: WindowsFoundation.IInspectable) {
|
||||
super.init(fromAbi)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcenotfoundeventargs.setresolvedcandidate)
|
||||
public func setResolvedCandidate(_ candidate: ResourceCandidate!) throws {
|
||||
try _default.SetResolvedCandidateImpl(candidate)
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcenotfoundeventargs.context)
|
||||
public var context : ResourceContext! {
|
||||
get { try! _default.get_ContextImpl() }
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.resourcenotfoundeventargs.name)
|
||||
public var name : String {
|
||||
get { try! _default.get_NameImpl() }
|
||||
}
|
||||
|
||||
deinit {
|
||||
_default = nil
|
||||
}
|
||||
}
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcecontext)
|
||||
public protocol IResourceContext : WinRTInterface {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcecontext.qualifiervalues)
|
||||
var qualifierValues: WindowsFoundation.AnyIMap<String, String>! { get }
|
||||
}
|
||||
|
||||
extension IResourceContext {
|
||||
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
switch iid {
|
||||
case __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContextWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceContextWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
public typealias AnyIResourceContext = any IResourceContext
|
||||
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager)
|
||||
public protocol IResourceManager : WinRTInterface {
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.createresourcecontext)
|
||||
func createResourceContext() throws -> WinAppSDK.ResourceContext!
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.mainresourcemap)
|
||||
var mainResourceMap: WinAppSDK.ResourceMap! { get }
|
||||
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.resources.iresourcemanager.resourcenotfound)
|
||||
var resourceNotFound: Event<TypedEventHandler<ResourceManager?, ResourceNotFoundEventArgs?>> { get }
|
||||
}
|
||||
|
||||
extension IResourceManager {
|
||||
public func queryInterface(_ iid: WindowsFoundation.IID) -> IUnknownRef? {
|
||||
switch iid {
|
||||
case __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerWrapper.IID:
|
||||
let wrapper = __ABI_Microsoft_Windows_ApplicationModel_Resources.IResourceManagerWrapper(self)
|
||||
return wrapper!.queryInterface(iid)
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
public typealias AnyIResourceManager = any IResourceManager
|
||||
|
||||
extension WinAppSDK.ResourceCandidateKind {
|
||||
public static var unknown : WinAppSDK.ResourceCandidateKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind_Unknown
|
||||
}
|
||||
public static var string : WinAppSDK.ResourceCandidateKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind_String
|
||||
}
|
||||
public static var filePath : WinAppSDK.ResourceCandidateKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind_FilePath
|
||||
}
|
||||
public static var embeddedData : WinAppSDK.ResourceCandidateKind {
|
||||
__x_ABI_CMicrosoft_CWindows_CApplicationModel_CResources_CResourceCandidateKind_EmbeddedData
|
||||
}
|
||||
}
|
||||
extension WinAppSDK.ResourceCandidateKind: @retroactive Hashable, @retroactive Codable {}
|
||||
|
||||
Binary file not shown.
9720
Sources/WinAppSDK/WinAppSDK+Generics.swift
Normal file
9720
Sources/WinAppSDK/WinAppSDK+Generics.swift
Normal file
File diff suppressed because it is too large
Load Diff
1065
Sources/WinAppSDK/WinAppSDK+MakeFromAbi.swift
Normal file
1065
Sources/WinAppSDK/WinAppSDK+MakeFromAbi.swift
Normal file
File diff suppressed because it is too large
Load Diff
126
generate-bindings.ps1
Normal file
126
generate-bindings.ps1
Normal file
@ -0,0 +1,126 @@
|
||||
function Restore-Nuget {
|
||||
param(
|
||||
[string]$PackagesDir
|
||||
)
|
||||
$NugetDownloadPath = Join-Path $env:TEMP "nuget.exe"
|
||||
if (-not (Test-Path $NugetDownloadPath)) {
|
||||
Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile $NugetDownloadPath
|
||||
}
|
||||
|
||||
& $NugetDownloadPath restore .\packages.config -PackagesDirectory $PackagesDir
|
||||
}
|
||||
|
||||
function Get-NugetPackageVersion() {
|
||||
param(
|
||||
[string]$Package
|
||||
)
|
||||
|
||||
return (Select-XML -Path $PSScriptRoot\packages.config -XPath "/packages/package[@id='$Package']/@version").Node.Value
|
||||
}
|
||||
|
||||
function Get-WinMDInputs() {
|
||||
param(
|
||||
[string]$Package
|
||||
)
|
||||
$Version = Get-NugetPackageVersion -Package $Package
|
||||
return Get-ChildItem -Path $PackagesDir\$Package.$Version\ -Filter *.winmd -Recurse
|
||||
$Winmds = $winmds | ForEach-Object {
|
||||
$RspParams += "-input $($_.FullName)`n"
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-SwiftWinRT() {
|
||||
param(
|
||||
[string]$PackagesDir
|
||||
)
|
||||
|
||||
$SwiftWinRTVersion = Get-NugetPackageVersion -Package "TheBrowserCompany.SwiftWinRT"
|
||||
|
||||
# write generated bindings to a temp directory since swiftwinrt will generate all dependencies and the CWinRT
|
||||
$OutputLocation = Join-Path $PSScriptRoot ".generated"
|
||||
if (Test-Path $OutputLocation) {
|
||||
Remove-Item -Path $OutputLocation -Recurse -Force
|
||||
}
|
||||
|
||||
$RspParams = "-output $OutputLocation`n"
|
||||
|
||||
# read projections.json and for each "include" write to -include param. for each "exclude" write to -exclude param
|
||||
$Projections = Get-Content -Path $PSScriptRoot\projections.json | ConvertFrom-Json
|
||||
$ProjectName = $Projections.Project
|
||||
if (-not $ProjectName) {
|
||||
Write-Host "projections.json must contain a 'Project' property" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
$Package = $Projections.Package
|
||||
if (-not $ProjectName) {
|
||||
Write-Host "projections.json must contain a 'Package' property" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
$Projections.Include | ForEach-Object {
|
||||
$RspParams += "-include $_`n"
|
||||
}
|
||||
$Projections.Exclude | ForEach-Object {
|
||||
$RspParams += "-exclude $_`n"
|
||||
}
|
||||
|
||||
Get-WinMDInputs -Package $Package | ForEach-Object {
|
||||
$RspParams += "-input $($_.FullName)`n"
|
||||
}
|
||||
|
||||
$Projections.Dependencies | ForEach-Object {
|
||||
Get-WinMDInputs -Package $_ | ForEach-Object {
|
||||
$RspParams += "-reference $($_.FullName)`n"
|
||||
}
|
||||
}
|
||||
|
||||
# write rsp params to file
|
||||
$RspFile = Join-Path $PSScriptRoot "swift-winrt.rsp"
|
||||
$RspParams | Out-File -FilePath $RspFile
|
||||
& $PackagesDir\TheBrowserCompany.SwiftWinRT.$SwiftWinRTVersion\bin\swiftwinrt.exe "@$RspFile"
|
||||
|
||||
# check error code
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "swiftwinrt failed with error code $LASTEXITCODE" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
# swift-winrt will generate all dependencies so copy all "UWP" sources from the generated dir to the UWP project
|
||||
$ProjectDir = Join-Path $PSScriptRoot "Sources\$ProjectName"
|
||||
Remove-Item -Path $ProjectDir -Recurse -Force
|
||||
Copy-Item -Path $OutputLocation\Sources\$ProjectName -Filter *.swift -Destination $ProjectDir -Recurse -Force
|
||||
}
|
||||
|
||||
function Copy-NativeBinaries {
|
||||
param(
|
||||
[string]$PackagesDir
|
||||
)
|
||||
|
||||
$Projections = Get-Content -Path $PSScriptRoot\projections.json | ConvertFrom-Json
|
||||
$Package = $Projections.Package
|
||||
$PackageVersion = Get-NugetPackageVersion -Package $Package
|
||||
|
||||
$PackageDir = Join-Path $PackagesDir "$Package.$PackageVersion"
|
||||
$PackagesRuntimeDir = Join-Path $PackageDir "runtimes\win-x64\native"
|
||||
$PackagesBinaries = Get-ChildItem -Path $PackagesRuntimeDir -Filter *.dll -Recurse
|
||||
|
||||
$ProjectName = $Projections.Project
|
||||
$ProjectDir = Join-Path $PSScriptRoot "Sources\${ProjectName}"
|
||||
|
||||
$ProjectBinaryDir = Join-Path $ProjectDir "NativeBinaries"
|
||||
if (-not (Test-Path $ProjectBinaryDir)) {
|
||||
New-Item -Path $ProjectBinaryDir -ItemType Directory -Force | Out-Null
|
||||
}
|
||||
|
||||
$PackagesBinaries | ForEach-Object {
|
||||
Copy-Item -Path $_.FullName -Destination $ProjectBinaryDir -Force
|
||||
}
|
||||
}
|
||||
|
||||
$PackagesDir = Join-Path $PSScriptRoot ".packages"
|
||||
Restore-Nuget -PackagesDir $PackagesDir
|
||||
Invoke-SwiftWinRT -PackagesDir $PackagesDir
|
||||
Copy-NativeBinaries -PackagesDir $PackagesDir
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "SwiftWinRT bindings generated successfully!" -ForegroundColor Green
|
||||
}
|
||||
6
packages.config
Normal file
6
packages.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="TheBrowserCompany.SwiftWinRT" version="0.5.0" />
|
||||
<package id="Microsoft.WindowsAppSDK" version="1.5.240205001-preview1" />
|
||||
<package id="Microsoft.Windows.SDK.Contracts" version="10.0.18362.2005" />
|
||||
</packages>
|
||||
25
projections.json
Normal file
25
projections.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"package": "Microsoft.WindowsAppSDK",
|
||||
"project": "WinAppSDK",
|
||||
"dependencies": [
|
||||
"Microsoft.Windows.SDK.Contracts"
|
||||
],
|
||||
"include": [
|
||||
"Microsoft.UI.Composition",
|
||||
"Microsoft.UI.Composition.Interactions",
|
||||
"Microsoft.UI.Composition.SpringVector3NaturalMotionAnimation",
|
||||
"Microsoft.UI.Composition.SystemBackdrops",
|
||||
"Microsoft.UI.Dispatching.DispatcherQueueController",
|
||||
"Microsoft.UI.Input",
|
||||
"Microsoft.UI.Windowing.AppWindow",
|
||||
"Microsoft.UI.Windowing.AppWindowTitleBar",
|
||||
"Microsoft.UI.Windowing.DisplayArea",
|
||||
"Microsoft.UI.Windowing.FullScreenPresenter",
|
||||
"Microsoft.UI.Windowing.OverlappedPresenter",
|
||||
"Microsoft.Windows.ApplicationModel.Resources.ResourceManager",
|
||||
"Microsoft.Windows.AppLifecycle.ActivationRegistrationManager",
|
||||
"Microsoft.Windows.AppLifecycle.AppInstance"
|
||||
],
|
||||
"exclude": [
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user