public int XInputGetCapabilities(
     int dwUserIndex,
     DeviceQueryType dwFlags,
     out Capabilities capabilitiesRef)
 {
     return(XInput.XInputGetCapabilities(dwUserIndex, dwFlags, out capabilitiesRef));
 }
Exemplo n.º 2
0
        public Capabilities GetCapabilities(DeviceQueryType deviceQueryType)
        {
            Capabilities capabilitiesRef;

            ErrorCodeHelper.ToResult(XInput.XInputGetCapabilities((int)this.userIndex, deviceQueryType, out capabilitiesRef)).CheckError();
            return(capabilitiesRef);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets the keystroke.
        /// </summary>
        /// <param name="deviceQueryType">The flag.</param>
        /// <param name="keystroke">The keystroke.</param>
        /// <returns></returns>
        /// <unmanaged>unsigned int XInputGetKeystroke([In] XUSER_INDEX dwUserIndex,[In] unsigned int dwReserved,[Out] XINPUT_KEYSTROKE* pKeystroke)</unmanaged>
        public Result GetKeystroke(DeviceQueryType deviceQueryType, out Keystroke keystroke)
        {
            var result = ErrorCodeHelper.ToResult(XInput.XInputGetKeystroke((int)userIndex, (int)deviceQueryType, out keystroke));

            result.CheckError();
            return(result);
        }
 public int XInputGetBatteryInformation(
     int dwUserIndex,
     BatteryDeviceType devType,
     out BatteryInformation batteryInformationRef)
 {
     return(XInput.XInputGetBatteryInformation(dwUserIndex, devType, out batteryInformationRef));
 }
Exemplo n.º 5
0
        public State GetState()
        {
            State stateRef;

            ErrorCodeHelper.ToResult(XInput.XInputGetState((int)this.userIndex, out stateRef)).CheckError();
            return(stateRef);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Sets the vibration.
        /// </summary>
        /// <param name="vibration">The vibration.</param>
        /// <returns></returns>
        public Result SetVibration(Vibration vibration)
        {
            var result = ErrorCodeHelper.ToResult(XInput.XInputSetState((int)userIndex, vibration));

            result.CheckError();
            return(result);
        }
Exemplo n.º 7
0
        public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType)
        {
            BatteryInformation batteryInformationRef;

            ErrorCodeHelper.ToResult(XInput.XInputGetBatteryInformation((int)this.userIndex, batteryDeviceType, out batteryInformationRef)).CheckError();
            return(batteryInformationRef);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Gets the state.
        /// </summary>
        /// <returns>The state of this controller.</returns>
        public State GetState()
        {
            State temp;
            var   result = ErrorCodeHelper.ToResult(XInput.XInputGetState((int)userIndex, out temp));

            result.CheckError();
            return(temp);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Gets the battery information.
        /// </summary>
        /// <param name="batteryDeviceType">Type of the battery device.</param>
        /// <returns></returns>
        /// <unmanaged>unsigned int XInputGetBatteryInformation([In] XUSER_INDEX dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation)</unmanaged>
        public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType)
        {
            BatteryInformation temp;
            var result = ErrorCodeHelper.ToResult(XInput.XInputGetBatteryInformation((int)userIndex, batteryDeviceType, out temp));

            result.CheckError();
            return(temp);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Gets the capabilities.
        /// </summary>
        /// <param name="deviceQueryType">Type of the device query.</param>
        /// <returns></returns>
        /// <unmanaged>unsigned int XInputGetCapabilities([In] XUSER_INDEX dwUserIndex,[In] XINPUT_DEVQUERYTYPE dwFlags,[Out] XINPUT_CAPABILITIES* pCapabilities)</unmanaged>
        public Capabilities GetCapabilities(DeviceQueryType deviceQueryType)
        {
            Capabilities temp;
            var          result = ErrorCodeHelper.ToResult(XInput.XInputGetCapabilities((int)userIndex, deviceQueryType, out temp));

            result.CheckError();
            return(temp);
        }
Exemplo n.º 11
0
        public static unsafe int XInputGetCapabilities(int dwUserIndex, DeviceQueryType dwFlags, out Capabilities capabilitiesRef)
        {
            capabilitiesRef = new Capabilities();
            int capabilities;

            fixed(Capabilities *capabilitiesPtr = &capabilitiesRef)
            capabilities = XInput.XInputGetCapabilities_(dwUserIndex, (int)dwFlags, (void *)capabilitiesPtr);

            return(capabilities);
        }
Exemplo n.º 12
0
        public static unsafe int XInputGetState(int dwUserIndex, out State stateRef)
        {
            stateRef = new State();
            int state;

            fixed(State *statePtr = &stateRef)
            state = XInput.XInputGetState_(dwUserIndex, (void *)statePtr);

            return(state);
        }
Exemplo n.º 13
0
        public static unsafe int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef)
        {
            keystrokeRef = new Keystroke();
            int keystroke;

            fixed(Keystroke *keystrokePtr = &keystrokeRef)
            keystroke = XInput.XInputGetKeystroke_(dwUserIndex, dwReserved, (void *)keystrokePtr);

            return(keystroke);
        }
 public int XInputGetAudioDeviceIds(
     int dwUserIndex,
     IntPtr renderDeviceIdRef,
     IntPtr renderCountRef,
     IntPtr captureDeviceIdRef,
     IntPtr captureCountRef)
 {
     return(XInput.XInputGetAudioDeviceIds(dwUserIndex, renderDeviceIdRef, renderCountRef, captureDeviceIdRef,
                                           captureCountRef));
 }
Exemplo n.º 15
0
        public static unsafe int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef)
        {
            batteryInformationRef = new BatteryInformation();
            int batteryInformation;

            fixed(BatteryInformation *batteryInformationPtr = &batteryInformationRef)
            batteryInformation = XInput.XInputGetBatteryInformation_(dwUserIndex, (int)devType, (void *)batteryInformationPtr);

            return(batteryInformation);
        }
Exemplo n.º 16
0
        public static unsafe int XInputGetDSoundAudioDeviceGuids(int dwUserIndex, out Guid dSoundRenderGuidRef, out Guid dSoundCaptureGuidRef)
        {
            dSoundRenderGuidRef  = new Guid();
            dSoundCaptureGuidRef = new Guid();
            int audioDeviceGuids;

            fixed(Guid *guidPtr1 = &dSoundRenderGuidRef)
            fixed(Guid * guidPtr2 = &dSoundCaptureGuidRef)
            audioDeviceGuids      = XInput.XInputGetDSoundAudioDeviceGuids_(dwUserIndex, (void *)guidPtr1, (void *)guidPtr2);

            return(audioDeviceGuids);
        }
Exemplo n.º 17
0
 public int XInputGetKeystroke(int dwUserIndex, int dwReserved, out Keystroke keystrokeRef)
 {
     return(XInput.XInputGetKeystroke(dwUserIndex, dwReserved, out keystrokeRef));
 }
Exemplo n.º 18
0
 public void XInputEnable(RawBool enable)
 {
     XInput.XInputEnable(enable);
 }
Exemplo n.º 19
0
 public int XInputGetState(int dwUserIndex, out State stateRef)
 {
     return(XInput.XInputGetState(dwUserIndex, out stateRef));
 }
Exemplo n.º 20
0
 public int XInputSetState(int dwUserIndex, Vibration vibrationRef)
 {
     return(XInput.XInputSetState(dwUserIndex, ref vibrationRef));
 }
Exemplo n.º 21
0
 public static void XInputEnable(Bool enable)
 {
     XInput.XInputEnable_(enable);
 }
Exemplo n.º 22
0
 /// <summary>
 /// Gets the capabilities.
 /// </summary>
 /// <param name="deviceQueryType">Type of the device query.</param>
 /// <param name="capabilities">The capabilities of this controller.</param>
 /// <returns><c>true</c> if the controller is connected, <c>false</c> otherwise.</returns>
 public bool GetCapabilities(DeviceQueryType deviceQueryType, out Capabilities capabilities)
 {
     return(XInput.XInputGetCapabilities((int)userIndex, deviceQueryType, out capabilities) == 0);
 }
Exemplo n.º 23
0
 public static unsafe int XInputSetState(int dwUserIndex, Vibration vibrationRef)
 {
     return(XInput.XInputSetState_(dwUserIndex, (void *)&vibrationRef));
 }
Exemplo n.º 24
0
 /// <summary>
 /// Gets the state.
 /// </summary>
 /// <param name="state">The state of this controller.</param>
 /// <returns><c>true</c> if the controller is connected, <c>false</c> otherwise.</returns>
 public bool GetState(out State state)
 {
     return(XInput.XInputGetState((int)userIndex, out state) == 0);
 }
Exemplo n.º 25
0
 /// <summary>
 /// Sets the reporting.
 /// </summary>
 /// <param name="enableReporting">if set to <c>true</c> [enable reporting].</param>
 public static void SetReporting(bool enableReporting)
 {
     XInput.XInputEnable(enableReporting);
 }