swift-windowsappsdk/Sources/WinAppSDK/Microsoft.UI.Content.swift
2024-02-14 00:02:20 -08:00

1095 lines
53 KiB
Swift

// 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.contentsizepolicy)
public typealias ContentSizePolicy = __x_ABI_CMicrosoft_CUI_CContent_CContentSizePolicy
/// [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.contentsiteenvironmentview)
open class ContentSiteEnvironmentView : WinRTClass {
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentSiteEnvironmentView
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteEnvironmentView
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_CIContentSiteEnvironmentView>?) -> ContentSiteEnvironmentView? {
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 _IContentSiteEnvironmentViewFactory : __ABI_Microsoft_UI_Content.IContentSiteEnvironmentViewFactory = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentSiteEnvironmentView"))
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteenvironmentview.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.contentsiteenvironmentview.displayid)
public var displayId : WinAppSDK.DisplayId {
get { try! _default.get_DisplayIdImpl() }
}
internal enum IContentSiteEnvironmentView : ComposableImpl {
internal typealias CABI = C_IInspectable
internal typealias SwiftABI = WindowsFoundation.IInspectable
internal typealias Class = ContentSiteEnvironmentView
internal typealias SwiftProjection = WinRTClassWeakReference<Class>
internal enum Default : AbiInterface {
internal typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteEnvironmentView
internal typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentSiteEnvironmentView
}
}
internal typealias Composable = IContentSiteEnvironmentView
deinit {
_default = nil
}
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview)
open class ContentSiteView : WinRTClass {
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentSiteView
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteView
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_CIContentSiteView>?) -> ContentSiteView? {
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 _IContentSiteViewFactory : __ABI_Microsoft_UI_Content.IContentSiteViewFactory = try! RoGetActivationFactory(HString("Microsoft.UI.Content.ContentSiteView"))
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview.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.contentsiteview.clientsize)
public var clientSize : UWP.SizeInt32 {
get { try! _default.get_ClientSizeImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview.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.contentsiteview.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.contentsiteview.environmentview)
public var environmentView : ContentSiteEnvironmentView! {
get { try! _default.get_EnvironmentViewImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview.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.contentsiteview.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.contentsiteview.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.contentsiteview.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.contentsiteview.overridescale)
public var overrideScale : Float {
get { try! _default.get_OverrideScaleImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview.parentscale)
public var parentScale : Float {
get { try! _default.get_ParentScaleImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview.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.contentsiteview.requestedsize)
public var requestedSize : WindowsFoundation.Vector2 {
get { try! _default.get_RequestedSizeImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.contentsiteview.shouldapplyrasterizationscale)
public var shouldApplyRasterizationScale : Bool {
get { try! _default.get_ShouldApplyRasterizationScaleImpl() }
}
internal enum IContentSiteView : ComposableImpl {
internal typealias CABI = C_IInspectable
internal typealias SwiftABI = WindowsFoundation.IInspectable
internal typealias Class = ContentSiteView
internal typealias SwiftProjection = WinRTClassWeakReference<Class>
internal enum Default : AbiInterface {
internal typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIContentSiteView
internal typealias SwiftABI = __ABI_Microsoft_UI_Content.IContentSiteView
}
}
internal typealias Composable = IContentSiteView
deinit {
_default = nil
}
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopchildsitebridge)
public final class DesktopChildSiteBridge : WinAppSDK.DesktopSiteBridge {
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IDesktopChildSiteBridge
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIDesktopChildSiteBridge
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_CIDesktopChildSiteBridge>?) -> DesktopChildSiteBridge? {
guard let abi = abi else { return nil }
return .init(fromAbi: WindowsFoundation.IInspectable(abi))
}
@_spi(WinRTInternal)
override public init(fromAbi: WindowsFoundation.IInspectable) {
super.init(fromAbi: fromAbi)
}
private static let _IDesktopChildSiteBridgeStatics: __ABI_Microsoft_UI_Content.IDesktopChildSiteBridgeStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Content.DesktopChildSiteBridge"))
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopchildsitebridge.create)
public static func create(_ compositor: WinAppSDK.Compositor!, _ parentWindowId: WinAppSDK.WindowId) -> DesktopChildSiteBridge! {
return try! _IDesktopChildSiteBridgeStatics.CreateImpl(compositor, parentWindowId)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopchildsitebridge.resizepolicy)
public var resizePolicy : ContentSizePolicy {
get { try! _default.get_ResizePolicyImpl() }
set { try! _default.put_ResizePolicyImpl(newValue) }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopchildsitebridge.siteview)
public var siteView : ContentSiteView! {
get { try! _default.get_SiteViewImpl() }
}
deinit {
_default = nil
}
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge)
open class DesktopSiteBridge : WinRTClass, WinAppSDK.IClosableNotifier, WindowsFoundation.IClosable, IContentSiteBridge {
private typealias SwiftABI = __ABI_Microsoft_UI_Content.IDesktopSiteBridge
private typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIDesktopSiteBridge
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_CIDesktopSiteBridge>?) -> DesktopSiteBridge? {
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 _IDesktopSiteBridgeFactory : __ABI_Microsoft_UI_Content.IDesktopSiteBridgeFactory = try! RoGetActivationFactory(HString("Microsoft.UI.Content.DesktopSiteBridge"))
private static let _IDesktopSiteBridgeStatics: __ABI_Microsoft_UI_Content.IDesktopSiteBridgeStatics = try! RoGetActivationFactory(HString("Microsoft.UI.Content.DesktopSiteBridge"))
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.issupported)
public class func isSupported() -> Bool {
return try! _IDesktopSiteBridgeStatics.IsSupportedImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.connect)
public func connect(_ content: ContentIsland!) throws {
try _default.ConnectImpl(content)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.disable)
public func disable() throws {
try _default.DisableImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.enable)
public func enable() throws {
try _default.EnableImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.hide)
public func hide() throws {
try _default.HideImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.moveandresize)
public func moveAndResize(_ rect: UWP.RectInt32) throws {
try _default.MoveAndResizeImpl(rect)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.moveinzorderatbottom)
public func moveInZOrderAtBottom() throws {
try _default.MoveInZOrderAtBottomImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.moveinzorderattop)
public func moveInZOrderAtTop() throws {
try _default.MoveInZOrderAtTopImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.moveinzorderbelow)
public func moveInZOrderBelow(_ windowId: WinAppSDK.WindowId) throws {
try _default.MoveInZOrderBelowImpl(windowId)
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.show)
public func show() throws {
try _default.ShowImpl()
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.isenabled)
public var isEnabled : Bool {
get { try! _default.get_IsEnabledImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.isvisible)
public var isVisible : Bool {
get { try! _default.get_IsVisibleImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.windowid)
public var windowId : WinAppSDK.WindowId {
get { try! _default.get_WindowIdImpl() }
}
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.desktopsitebridge.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.desktopsitebridge.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.desktopsitebridge.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 _IClosable: __ABI_Windows_Foundation.IClosable! = getInterfaceForCaching()
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.close)
public func close() throws {
try _IClosable.CloseImpl()
}
private lazy var _IContentSiteBridge: __ABI_Microsoft_UI_Content.IContentSiteBridge! = getInterfaceForCaching()
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.dispatcherqueue)
public var dispatcherQueue : WinAppSDK.DispatcherQueue! {
get { try! _IContentSiteBridge.get_DispatcherQueueImpl() }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.layoutdirectionoverride)
public var layoutDirectionOverride : ContentLayoutDirection? {
get { try! _IContentSiteBridge.get_LayoutDirectionOverrideImpl() }
set { try! _IContentSiteBridge.put_LayoutDirectionOverrideImpl(newValue) }
}
/// [Open Microsoft documentation](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.content.desktopsitebridge.overridescale)
public var overrideScale : Float {
get { try! _IContentSiteBridge.get_OverrideScaleImpl() }
set { try! _IContentSiteBridge.put_OverrideScaleImpl(newValue) }
}
internal enum IDesktopSiteBridge : ComposableImpl {
internal typealias CABI = C_IInspectable
internal typealias SwiftABI = WindowsFoundation.IInspectable
internal typealias Class = DesktopSiteBridge
internal typealias SwiftProjection = WinRTClassWeakReference<Class>
internal enum Default : AbiInterface {
internal typealias CABI = __x_ABI_CMicrosoft_CUI_CContent_CIDesktopSiteBridge
internal typealias SwiftABI = __ABI_Microsoft_UI_Content.IDesktopSiteBridge
}
}
internal typealias Composable = IDesktopSiteBridge
deinit {
_default = nil
_IClosableNotifier = nil
_IClosable = nil
_IContentSiteBridge = 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 {}
extension WinAppSDK.ContentSizePolicy {
public static var none : WinAppSDK.ContentSizePolicy {
__x_ABI_CMicrosoft_CUI_CContent_CContentSizePolicy_None
}
public static var resizeContentToParentWindow : WinAppSDK.ContentSizePolicy {
__x_ABI_CMicrosoft_CUI_CContent_CContentSizePolicy_ResizeContentToParentWindow
}
public static var resizeParentWindowToContent : WinAppSDK.ContentSizePolicy {
__x_ABI_CMicrosoft_CUI_CContent_CContentSizePolicy_ResizeParentWindowToContent
}
}
extension WinAppSDK.ContentSizePolicy: @retroactive Hashable, @retroactive Codable {}