2 * Copyright 2021 RĂ©mi Bernon for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"asyncinfo.idl";
25 import
"eventtoken.idl";
26 import
"windowscontracts.idl";
27 import
"windows.foundation.idl";
32 namespace ForceFeedback
{
33 typedef enum ForceFeedbackEffectAxes ForceFeedbackEffectAxes
;
34 typedef enum ForceFeedbackLoadEffectResult ForceFeedbackLoadEffectResult
;
35 interface IForceFeedbackEffect
;
36 runtimeclass ForceFeedbackMotor
;
45 namespace ForceFeedback
{
47 interface Windows.Foundation.AsyncOperationCompletedHandler
<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult
>;
48 interface Windows.Foundation.IAsyncOperation
<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult
>;
49 interface Windows.Foundation.Collections.IVectorView
<Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor
*>;
59 namespace ForceFeedback
{
61 contract
(Windows.Foundation.UniversalApiContract
, 3.0),
64 enum ForceFeedbackEffectAxes
72 [contract
(Windows.Foundation.UniversalApiContract
, 3.0)]
73 enum ForceFeedbackLoadEffectResult
76 EffectStorageFull
= 1,
77 EffectNotSupported
= 2
81 contract
(Windows.Foundation.UniversalApiContract
, 3.0),
82 exclusiveto
(Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor
),
83 uuid(8d3d417c
-a5ea
-4516-8026-2b00f74ef6e5
)
85 interface IForceFeedbackMotor
: IInspectable
87 [propget] HRESULT AreEffectsPaused
([out, retval] boolean* value
);
88 [propget] HRESULT MasterGain
([out, retval] DOUBLE* value
);
89 [propput] HRESULT MasterGain
([in] DOUBLE value
);
90 [propget] HRESULT IsEnabled
([out, retval] boolean* value
);
91 [propget] HRESULT SupportedAxes
([out, retval] Windows.Gaming.Input.ForceFeedback.ForceFeedbackEffectAxes
* value
);
92 HRESULT LoadEffectAsync
([in] Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect
* effect
,
93 [out, retval] Windows.Foundation.IAsyncOperation
<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult
>** async_op
);
94 HRESULT PauseAllEffects
();
95 HRESULT ResumeAllEffects
();
96 HRESULT StopAllEffects
();
97 HRESULT TryDisableAsync
([out, retval] Windows.Foundation.IAsyncOperation
<boolean>** async_op
);
98 HRESULT TryEnableAsync
([out, retval] Windows.Foundation.IAsyncOperation
<boolean>** async_op
);
99 HRESULT TryResetAsync
([out, retval] Windows.Foundation.IAsyncOperation
<boolean>** async_op
);
100 HRESULT TryUnloadEffectAsync
([in] Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect
* effect
,
101 [out, retval] Windows.Foundation.IAsyncOperation
<boolean>** async_op
);
105 contract
(Windows.Foundation.UniversalApiContract
, 3.0),
106 marshaling_behavior
(agile
),
109 runtimeclass ForceFeedbackMotor
111 [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackMotor
;