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

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "Windows.Foundation.idl";
import "Windows.System.idl";
// Additional imports to ensure that all required headers are included
cpp_quote("#if defined(__cplusplus)")
cpp_quote("}")
cpp_quote("#endif // defined(__cplusplus)")
cpp_quote("#include <Windows.Foundation.h>")
cpp_quote("#if !defined(__windows2Esystem_h__)")
cpp_quote("#include <Windows.System.h>")
cpp_quote("#endif // !defined(__windows2Esystem_h__)")
cpp_quote("#if defined(__cplusplus)")
cpp_quote("extern \"C\" {")
cpp_quote("#endif // defined(__cplusplus)")

// Forward Declare
namespace Windows
{
    namespace System
    {
        runtimeclass User;

        runtimeclass UserChangedEventArgs;
    }
}
namespace Windows
{
    namespace Gaming
    {
        namespace Input
        {
            typedef enum GamepadButtons GamepadButtons;

            typedef struct GamepadReading GamepadReading;

            typedef struct GamepadVibration GamepadVibration;

            interface IGameController;

            interface IGamepad;

            interface IGamepadStatics;

            interface IHeadset;

            runtimeclass Headset;

            runtimeclass Gamepad;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Gaming
    {
        namespace Input
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Gaming.Input.Gamepad*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Gaming.Input.Gamepad*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.Gamepad*>;

                interface Windows.Foundation.EventHandler<Windows.Gaming.Input.Gamepad*>;

                interface Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController*, Windows.Gaming.Input.Headset*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Gaming
    {
        namespace Input
        {
            [flags]
            [version(0x0A000000)]
            enum GamepadButtons
            {
                None            = 0x0,
                Menu            = 0x1,
                View            = 0x2,
                A               = 0x4,
                B               = 0x8,
                X               = 0x10,
                Y               = 0x20,
                DPadUp          = 0x40,
                DPadDown        = 0x80,
                DPadLeft        = 0x100,
                DPadRight       = 0x200,
                LeftShoulder    = 0x400,
                RightShoulder   = 0x800,
                LeftThumbstick  = 0x1000,
                RightThumbstick = 0x2000
            };

            [version(0x0A000000)]
            struct GamepadReading
            {
                UINT64 Timestamp;
                Windows.Gaming.Input.GamepadButtons Buttons;
                DOUBLE LeftTrigger;
                DOUBLE RightTrigger;
                DOUBLE LeftThumbstickX;
                DOUBLE LeftThumbstickY;
                DOUBLE RightThumbstickX;
                DOUBLE RightThumbstickY;
            };

            [version(0x0A000000)]
            struct GamepadVibration
            {
                DOUBLE LeftMotor;
                DOUBLE RightMotor;
                DOUBLE LeftTrigger;
                DOUBLE RightTrigger;
            };

            [uuid(1BAF6522-5F64-42C5-8267-B9FE2215BFBD)]
            [version(0x0A000000)]
            interface IGameController : IInspectable
            {
                [eventadd] HRESULT HeadsetConnected([in] Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController*, Windows.Gaming.Input.Headset*>* value, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT HeadsetConnected([in] EventRegistrationToken token);
                [eventadd] HRESULT HeadsetDisconnected([in] Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController*, Windows.Gaming.Input.Headset*>* value, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT HeadsetDisconnected([in] EventRegistrationToken token);
                [eventadd] HRESULT UserChanged([in] Windows.Foundation.TypedEventHandler<Windows.Gaming.Input.IGameController*, Windows.System.UserChangedEventArgs*>* value, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT UserChanged([in] EventRegistrationToken token);
                [propget] HRESULT Headset([out] [retval] Windows.Gaming.Input.Headset** value);
                [propget] HRESULT IsWireless([out] [retval] boolean* value);
                [propget] HRESULT User([out] [retval] Windows.System.User** value);
            }

            [exclusiveto(Windows.Gaming.Input.Gamepad)]
            [uuid(BC7BB43C-0A69-3903-9E9D-A50F86A45DE5)]
            [version(0x0A000000)]
            interface IGamepad : IInspectable
                requires
                    Windows.Gaming.Input.IGameController
            {
                [propget] HRESULT Vibration([out] [retval] Windows.Gaming.Input.GamepadVibration* value);
                [propput] HRESULT Vibration([in] Windows.Gaming.Input.GamepadVibration value);
                HRESULT GetCurrentReading([out] [retval] Windows.Gaming.Input.GamepadReading* value);
            }

            [exclusiveto(Windows.Gaming.Input.Gamepad)]
            [uuid(8BBCE529-D49C-39E9-9560-E47DDE96B7C8)]
            [version(0x0A000000)]
            interface IGamepadStatics : IInspectable
            {
                [eventadd] HRESULT GamepadAdded([in] Windows.Foundation.EventHandler<Windows.Gaming.Input.Gamepad*>* value, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT GamepadAdded([in] EventRegistrationToken token);
                [eventadd] HRESULT GamepadRemoved([in] Windows.Foundation.EventHandler<Windows.Gaming.Input.Gamepad*>* value, [out] [retval] EventRegistrationToken* token);
                [eventremove] HRESULT GamepadRemoved([in] EventRegistrationToken token);
                [propget] HRESULT Gamepads([out] [retval] Windows.Foundation.Collections.IVectorView<Windows.Gaming.Input.Gamepad*>** value);
            }

            [exclusiveto(Windows.Gaming.Input.Headset)]
            [uuid(3FD156EF-6925-3FA8-9181-029C5223AE3B)]
            [version(0x0A000000)]
            interface IHeadset : IInspectable
            {
                [propget] HRESULT CaptureDeviceId([out] [retval] HSTRING* value);
                [propget] HRESULT RenderDeviceId([out] [retval] HSTRING* value);
            }

            [marshaling_behavior(agile)]
            [threading(both)]
            [version(0x0A000000)]
            runtimeclass Headset
            {
                [default] interface Windows.Gaming.Input.IHeadset;
            }

            [marshaling_behavior(agile)]
            [static(Windows.Gaming.Input.IGamepadStatics, 0x0A000000)]
            [threading(both)]
            [version(0x0A000000)]
            runtimeclass Gamepad
            {
                interface Windows.Gaming.Input.IGameController;
                [default] interface Windows.Gaming.Input.IGamepad;
            }
        }
    }
}
