//
// 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";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        typedef struct TimeSpan TimeSpan;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace Devices
    {
        namespace Haptics
        {
            typedef enum HapticDeviceType HapticDeviceType;

            typedef enum VibrationAccessStatus VibrationAccessStatus;

            typedef struct HapticsControllerOverrideToken HapticsControllerOverrideToken;

            interface IInputHapticsManager;

            interface IInputHapticsManagerStatics;

            interface IKnownSimpleHapticsControllerWaveformsStatics;

            interface IKnownSimpleHapticsControllerWaveformsStatics2;

            interface ISimpleHapticsController;

            interface ISimpleHapticsControllerFeedback;

            interface IVibrationDevice;

            interface IVibrationDeviceStatics;

            runtimeclass InputHapticsManager;

            runtimeclass KnownSimpleHapticsControllerWaveforms;

            runtimeclass SimpleHapticsController;

            runtimeclass SimpleHapticsControllerFeedback;

            runtimeclass VibrationDevice;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Devices
    {
        namespace Haptics
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Devices.Haptics.SimpleHapticsController*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Devices.Haptics.SimpleHapticsControllerFeedback*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Devices.Haptics.VibrationDevice*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Devices.Haptics.SimpleHapticsController*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Devices.Haptics.SimpleHapticsControllerFeedback*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Devices.Haptics.VibrationDevice*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.SimpleHapticsController*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.SimpleHapticsControllerFeedback*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.VibrationDevice*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.Haptics.VibrationAccessStatus>;

                interface Windows.Foundation.IAsyncOperation<Windows.Devices.Haptics.VibrationDevice*>;

                interface Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.VibrationDevice*>*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Devices
    {
        namespace Haptics
        {
            [contract(Windows.Foundation.UniversalApiContract, 19.0)]
            enum HapticDeviceType
            {
                None     = 0,
                Generic  = 1,
                Pen      = 2,
                Touchpad = 3,
                Mouse    = 4
            };

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            enum VibrationAccessStatus
            {
                Allowed             = 0,
                DeniedByUser        = 1,
                DeniedBySystem      = 2,
                DeniedByEnergySaver = 3
            };

            [contract(Windows.Foundation.UniversalApiContract, 19.0)]
            struct HapticsControllerOverrideToken
            {
                INT64 Value;
            };

            [contract(Windows.Foundation.UniversalApiContract, 19.0)]
            [exclusiveto(Windows.Devices.Haptics.InputHapticsManager)]
            [uuid(040E91DF-BB3A-507C-9E25-A2D2C685B2E5)]
            interface IInputHapticsManager : IInspectable
            {
                [propget] HRESULT ThreadId([out] [retval] UINT32* value);
                [propget] HRESULT CurrentHapticsControllerDeviceType([out] [retval] Windows.Devices.Haptics.HapticDeviceType* value);
                [propget] HRESULT CurrentHapticsController([out] [retval] Windows.Devices.Haptics.SimpleHapticsController** value);
                [overload("TrySendHapticWaveform")] HRESULT TrySendHapticWaveform([in] UINT16 waveform, [in] UINT16 waveformFallback, [out] [retval] boolean* result);
                [overload("TrySendHapticWaveform")] HRESULT TrySendHapticWaveformWithIntensity([in] UINT16 waveform, [in] UINT16 waveformFallback, [in] DOUBLE intensity, [out] [retval] boolean* result);
                HRESULT TrySendHapticWaveformForDuration([in] UINT16 waveform, [in] UINT16 waveformFallback, [in] DOUBLE intensity, [in] Windows.Foundation.TimeSpan playDuration, [out] [retval] boolean* result);
                HRESULT TrySendHapticWaveformForPlayCount([in] UINT16 waveform, [in] UINT16 waveformFallback, [in] DOUBLE intensity, [in] INT32 playCount, [in] Windows.Foundation.TimeSpan replayPauseInterval, [out] [retval] boolean* result);
                HRESULT TryStopFeedback([out] [retval] boolean* result);
                HRESULT SetOverrideHapticsController([in] Windows.Devices.Haptics.HapticDeviceType deviceType, [in] Windows.Devices.Haptics.SimpleHapticsController* controller, [out] [retval] Windows.Devices.Haptics.HapticsControllerOverrideToken* result);
                HRESULT ClearOverrideHapticsController([in] Windows.Devices.Haptics.HapticsControllerOverrideToken token);
            }

            [contract(Windows.Foundation.UniversalApiContract, 19.0)]
            [exclusiveto(Windows.Devices.Haptics.InputHapticsManager)]
            [uuid(7BB40F77-E187-5322-844E-AA58223C281A)]
            interface IInputHapticsManagerStatics : IInspectable
            {
                HRESULT IsSupported([out] [retval] boolean* result);
                HRESULT IsHapticDevicePresent([out] [retval] boolean* result);
                HRESULT GetForCurrentThread([out] [retval] Windows.Devices.Haptics.InputHapticsManager** result);
                HRESULT TryGetForThread([in] UINT32 ThreadId, [out] [retval] Windows.Devices.Haptics.InputHapticsManager** result);
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [exclusiveto(Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms)]
            [uuid(3D577EF7-4CEE-11E6-B535-001BDC06AB3B)]
            interface IKnownSimpleHapticsControllerWaveformsStatics : IInspectable
            {
                [propget] HRESULT Click([out] [retval] UINT16* value);
                [propget] HRESULT BuzzContinuous([out] [retval] UINT16* value);
                [propget] HRESULT RumbleContinuous([out] [retval] UINT16* value);
                [propget] HRESULT Press([out] [retval] UINT16* value);
                [propget] HRESULT Release([out] [retval] UINT16* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 14.0)]
            [exclusiveto(Windows.Devices.Haptics.KnownSimpleHapticsControllerWaveforms)]
            [uuid(A7D24C27-B79D-510A-BF79-FF6D49173E1D)]
            interface IKnownSimpleHapticsControllerWaveformsStatics2 : IInspectable
            {
                [propget] HRESULT BrushContinuous([out] [retval] UINT16* value);
                [propget] HRESULT ChiselMarkerContinuous([out] [retval] UINT16* value);
                [propget] HRESULT EraserContinuous([out] [retval] UINT16* value);
                [propget] HRESULT Error([out] [retval] UINT16* value);
                [propget] HRESULT GalaxyPenContinuous([out] [retval] UINT16* value);
                [propget] HRESULT Hover([out] [retval] UINT16* value);
                [propget] HRESULT InkContinuous([out] [retval] UINT16* value);
                [propget] HRESULT MarkerContinuous([out] [retval] UINT16* value);
                [propget] HRESULT PencilContinuous([out] [retval] UINT16* value);
                [propget] HRESULT Success([out] [retval] UINT16* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [exclusiveto(Windows.Devices.Haptics.SimpleHapticsController)]
            [uuid(3D577EF9-4CEE-11E6-B535-001BDC06AB3B)]
            interface ISimpleHapticsController : IInspectable
            {
                [propget] HRESULT Id([out] [retval] HSTRING* value);
                [propget] HRESULT SupportedFeedback([out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.SimpleHapticsControllerFeedback*>** value);
                [propget] HRESULT IsIntensitySupported([out] [retval] boolean* value);
                [propget] HRESULT IsPlayCountSupported([out] [retval] boolean* value);
                [propget] HRESULT IsPlayDurationSupported([out] [retval] boolean* value);
                [propget] HRESULT IsReplayPauseIntervalSupported([out] [retval] boolean* value);
                HRESULT StopFeedback();
                [overload("SendHapticFeedback")] HRESULT SendHapticFeedback([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback* feedback);
                [overload("SendHapticFeedback")] HRESULT SendHapticFeedbackWithIntensity([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback* feedback, [in] DOUBLE intensity);
                HRESULT SendHapticFeedbackForDuration([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback* feedback, [in] DOUBLE intensity, [in] Windows.Foundation.TimeSpan playDuration);
                HRESULT SendHapticFeedbackForPlayCount([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback* feedback, [in] DOUBLE intensity, [in] INT32 playCount, [in] Windows.Foundation.TimeSpan replayPauseInterval);
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [exclusiveto(Windows.Devices.Haptics.SimpleHapticsControllerFeedback)]
            [uuid(3D577EF8-4CEE-11E6-B535-001BDC06AB3B)]
            interface ISimpleHapticsControllerFeedback : IInspectable
            {
                [propget] HRESULT Waveform([out] [retval] UINT16* value);
                [propget] HRESULT Duration([out] [retval] Windows.Foundation.TimeSpan* value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [exclusiveto(Windows.Devices.Haptics.VibrationDevice)]
            [uuid(40F21A3E-8844-47FF-B312-06185A3844DA)]
            interface IVibrationDevice : IInspectable
            {
                [propget] HRESULT Id([out] [retval] HSTRING* value);
                [propget] HRESULT SimpleHapticsController([out] [retval] Windows.Devices.Haptics.SimpleHapticsController** value);
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [exclusiveto(Windows.Devices.Haptics.VibrationDevice)]
            [uuid(53E2EDED-2290-4AC9-8EB3-1A84122EB71C)]
            interface IVibrationDeviceStatics : IInspectable
            {
                HRESULT RequestAccessAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Haptics.VibrationAccessStatus>** operation);
                HRESULT GetDeviceSelector([out] [retval] HSTRING* result);
                HRESULT FromIdAsync([in] HSTRING deviceId, [out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Haptics.VibrationDevice*>** operation);
                HRESULT GetDefaultAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Haptics.VibrationDevice*>** operation);
                HRESULT FindAllAsync([out] [retval] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.VibrationDevice*>*>** operation);
            }

            [contract(Windows.Foundation.UniversalApiContract, 19.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.Haptics.IInputHapticsManagerStatics, Windows.Foundation.UniversalApiContract, 19.0)]
            [threading(both)]
            runtimeclass InputHapticsManager
            {
                [default] interface Windows.Devices.Haptics.IInputHapticsManager;
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.Haptics.IKnownSimpleHapticsControllerWaveformsStatics, Windows.Foundation.UniversalApiContract, 4.0)]
            [static(Windows.Devices.Haptics.IKnownSimpleHapticsControllerWaveformsStatics2, Windows.Foundation.UniversalApiContract, 14.0)]
            runtimeclass KnownSimpleHapticsControllerWaveforms
            {
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [marshaling_behavior(agile)]
            runtimeclass SimpleHapticsController
            {
                [default] interface Windows.Devices.Haptics.ISimpleHapticsController;
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [marshaling_behavior(agile)]
            runtimeclass SimpleHapticsControllerFeedback
            {
                [default] interface Windows.Devices.Haptics.ISimpleHapticsControllerFeedback;
            }

            [contract(Windows.Foundation.UniversalApiContract, 4.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Devices.Haptics.IVibrationDeviceStatics, Windows.Foundation.UniversalApiContract, 4.0)]
            [threading(both)]
            runtimeclass VibrationDevice
            {
                [default] interface Windows.Devices.Haptics.IVibrationDevice;
            }
        }
    }
}
