//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0021
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.idl";
import "Windows.Foundation.idl";
import "Windows.UI.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        runtimeclass Deferral;

        runtimeclass Uri;
    }
}
namespace Windows
{
    namespace UI
    {
        typedef struct WindowId WindowId;
    }
}
namespace Windows
{
    namespace UI
    {
        namespace Shell
        {
            namespace CompanionWindows
            {
                apicontract CompanionWindowsContract;

                typedef enum CompanionWindowRequestResultStatus CompanionWindowRequestResultStatus;

                interface ICompanionWindowCoordinator;

                interface ICompanionWindowCoordinatorStatics;

                interface ICompanionWindowRequest;

                interface ICompanionWindowRequestResult;

                interface ICompanionWindowRequestStatics;

                runtimeclass CompanionWindowCoordinator;

                runtimeclass CompanionWindowRequest;

                runtimeclass CompanionWindowRequestResult;
            }
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace UI
    {
        namespace Shell
        {
            namespace CompanionWindows
            {
                declare
                {
                    interface Windows.Foundation.IAsyncOperation<Windows.UI.Shell.CompanionWindows.CompanionWindowRequestResult*>;

                    interface Windows.Foundation.TypedEventHandler<Windows.UI.Shell.CompanionWindows.CompanionWindowCoordinator*, IInspectable*>;
                }
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace UI
    {
        namespace Shell
        {
            namespace CompanionWindows
            {
                [contractversion(1.0)]
                apicontract CompanionWindowsContract
                {
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [experimental]
                enum CompanionWindowRequestResultStatus
                {
                    Success                = 0,
                    UnknownFailure         = 1,
                    RegistrationNotFound   = 2,
                    ActivationTimedOut     = 3,
                    RejectedByCompanionApp = 4
                };

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [exclusiveto(Windows.UI.Shell.CompanionWindows.CompanionWindowCoordinator)]
                [experimental]
                [uuid(05620E87-B0F7-59BA-B3A5-D614BDC1EBE3)]
                interface ICompanionWindowCoordinator : IInspectable
                {
                    HRESULT RequestWindowFromAppAsync([in] HSTRING appId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.UI.Shell.CompanionWindows.CompanionWindowRequestResult*>** operation);
                    HRESULT DetachCompanionWindow();
                    [propget] HRESULT CompanionWindowId([out] [retval] Windows.UI.WindowId* value);
                    [eventadd] HRESULT Changed([in] Windows.Foundation.TypedEventHandler<Windows.UI.Shell.CompanionWindows.CompanionWindowCoordinator*, IInspectable*>* handler, [out] [retval] EventRegistrationToken* token);
                    [eventremove] HRESULT Changed([in] EventRegistrationToken token);
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [exclusiveto(Windows.UI.Shell.CompanionWindows.CompanionWindowCoordinator)]
                [experimental]
                [uuid(964022FA-380E-518C-BFC8-0F3B84FAFEA3)]
                interface ICompanionWindowCoordinatorStatics : IInspectable
                {
                    HRESULT GetForWindow([in] Windows.UI.WindowId windowId, [out] [retval] Windows.UI.Shell.CompanionWindows.CompanionWindowCoordinator** result);
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [exclusiveto(Windows.UI.Shell.CompanionWindows.CompanionWindowRequest)]
                [experimental]
                [uuid(D92C351A-2D66-59A8-B345-78489562C4D8)]
                interface ICompanionWindowRequest : IInspectable
                {
                    HRESULT Accept([in] Windows.UI.WindowId windowId, [out] [retval] Windows.UI.Shell.CompanionWindows.CompanionWindowCoordinator** result);
                    HRESULT Reject();
                    HRESULT GetDeferral([out] [retval] Windows.Foundation.Deferral** result);
                    [propget] HRESULT RequestingWindowId([out] [retval] Windows.UI.WindowId* value);
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [exclusiveto(Windows.UI.Shell.CompanionWindows.CompanionWindowRequestResult)]
                [experimental]
                [uuid(D728D2EF-E6D4-5CC0-9FF4-20C17A2CE72D)]
                interface ICompanionWindowRequestResult : IInspectable
                {
                    [propget] HRESULT Succeeded([out] [retval] boolean* value);
                    [propget] HRESULT Status([out] [retval] Windows.UI.Shell.CompanionWindows.CompanionWindowRequestResultStatus* value);
                    [propget] HRESULT ExtendedError([out] [retval] HRESULT* value);
                    [propget] HRESULT CompanionWindowId([out] [retval] Windows.UI.WindowId* value);
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [exclusiveto(Windows.UI.Shell.CompanionWindows.CompanionWindowRequest)]
                [experimental]
                [uuid(585E4544-D474-506A-96C2-3597A44882DA)]
                interface ICompanionWindowRequestStatics : IInspectable
                {
                    HRESULT GetFromLaunchUri([in] Windows.Foundation.Uri* launchUri, [out] [retval] Windows.UI.Shell.CompanionWindows.CompanionWindowRequest** result);
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [experimental]
                [marshaling_behavior(agile)]
                [static(Windows.UI.Shell.CompanionWindows.ICompanionWindowCoordinatorStatics, Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [threading(both)]
                runtimeclass CompanionWindowCoordinator
                {
                    [default] [experimental] interface Windows.UI.Shell.CompanionWindows.ICompanionWindowCoordinator;
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [experimental]
                [marshaling_behavior(agile)]
                [static(Windows.UI.Shell.CompanionWindows.ICompanionWindowRequestStatics, Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [threading(both)]
                runtimeclass CompanionWindowRequest
                {
                    [default] [experimental] interface Windows.UI.Shell.CompanionWindows.ICompanionWindowRequest;
                }

                [contract(Windows.UI.Shell.CompanionWindows.CompanionWindowsContract, 1.0)]
                [experimental]
                [marshaling_behavior(agile)]
                runtimeclass CompanionWindowRequestResult
                {
                    [default] [experimental] interface Windows.UI.Shell.CompanionWindows.ICompanionWindowRequestResult;
                }
            }
        }
    }
}
