+++ /dev/null
-/*\r
-* Copyright (c) 2007-2010 SlimDX Group\r
-* \r
-* Permission is hereby granted, free of charge, to any person obtaining a copy\r
-* of this software and associated documentation files (the "Software"), to deal\r
-* in the Software without restriction, including without limitation the rights\r
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
-* copies of the Software, and to permit persons to whom the Software is\r
-* furnished to do so, subject to the following conditions:\r
-* \r
-* The above copyright notice and this permission notice shall be included in\r
-* all copies or substantial portions of the Software.\r
-* \r
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
-* THE SOFTWARE.\r
-*/\r
-#pragma once\r
-\r
-#include "../Result.h"\r
-\r
-#include "CapabilitiesXI.h"\r
-#include "BatteryInformation.h"\r
-#include "Enums.h"\r
-#include "Keystroke.h"\r
-#include "State.h"\r
-#include "Vibration.h"\r
-\r
-using System::Runtime::InteropServices::OutAttribute;\r
-\r
-namespace SlimDX\r
-{\r
- namespace XInput\r
- {\r
- /// <summary>\r
- /// Represents an XInput controller.\r
- /// </summary>\r
- public ref class Controller\r
- {\r
- private:\r
- System::UInt32 m_UserIndex;\r
- \r
- static int ConvertError( int errorCode );\r
- \r
- public:\r
- /// <summary>\r
- /// Gets a value indicating whether or not the controller is connected.\r
- /// </summary>\r
- property bool IsConnected\r
- {\r
- bool get();\r
- }\r
- \r
- /// <summary>\r
- /// Gets the identifier for the sound renderer in the controller.\r
- /// </summary>\r
- property System::Guid SoundRenderGuid\r
- {\r
- System::Guid get();\r
- }\r
-\r
- /// <summary>\r
- /// Gets the identifier for the sound capture device in the controller.\r
- /// </summary>\r
- property System::Guid SoundCaptureGuid\r
- {\r
- System::Guid get();\r
- }\r
- \r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="Controller"/> class.\r
- /// </summary>\r
- /// <param name="userIndex">The index of the player whose controller is being represented.</param>\r
- Controller( UserIndex userIndex );\r
- \r
- /// <summary>\r
- /// Retrieves battery information for the controller.\r
- /// </summary>\r
- /// <param name="battery">The type of battery whose information is being retrieved.</param>\r
- /// <returns>A <see cref="BatteryInformation"/> structure describing the battery in the controller.</returns>\r
- BatteryInformation GetBatteryInformation( BatteryDeviceType battery );\r
-\r
- /// <summary>\r
- /// Retrieves the capabilities of the controller.\r
- /// </summary>\r
- /// <param name="device">The type of the device whose capabilities are being retrieved.</param>\r
- /// <returns>A <see cref="XInput::Capabilities"/> structure describing the capabilities of the controller.</returns>\r
- Capabilities GetCapabilities( DeviceQueryType device );\r
-\r
- /// <summary>\r
- /// Gets the state of the controller.\r
- /// </summary>\r
- /// <returns>A <see cref="XInput::State"/> structure describing the state of the controller.</returns>\r
- State GetState();\r
- \r
- /// <summary>\r
- /// Gets keystroke information from the device.\r
- /// </summary>\r
- /// <param name="flag">The type of the device to query.</param>\r
- /// <param name="keystroke">Keystroke information from the device.</param>\r
- /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
- Result GetKeystroke( DeviceQueryType flag, [Out] Keystroke% keystroke );\r
- \r
- /// <summary>\r
- /// Sets vibration information for the controller.\r
- /// </summary>\r
- /// <param name="vibration">Vibration settings for the controller.</param>\r
- /// <returns>A <see cref="SlimDX::Result"/> object describing the result of the operation.</returns>\r
- Result SetVibration( Vibration vibration );\r
-\r
- /// <summary>\r
- /// Enables or disables data reporting in XInput.\r
- /// </summary>\r
- /// <param name="value"><c>true</c> to enable XInput, <c>false</c> to disable it.</param>\r
- static void SetReporting( bool value );\r
- };\r
- }\r
-}
\ No newline at end of file