Rémi Bernon : include: Add Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect runtimeclass declaration.

Alexandre Julliard julliard at winehq.org
Wed Apr 27 16:12:15 CDT 2022


Module: wine
Branch: master
Commit: cc6358b37a15f71ca6a6a7ccc1af0b356a460883
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=cc6358b37a15f71ca6a6a7ccc1af0b356a460883

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Wed Apr 27 08:26:31 2022 +0200

include: Add Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect runtimeclass declaration.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/windows.gaming.input.forcefeedback.idl | 56 ++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/include/windows.gaming.input.forcefeedback.idl b/include/windows.gaming.input.forcefeedback.idl
index 639e0c5cd57..e02c136e562 100644
--- a/include/windows.gaming.input.forcefeedback.idl
+++ b/include/windows.gaming.input.forcefeedback.idl
@@ -25,13 +25,18 @@ import "asyncinfo.idl";
 import "eventtoken.idl";
 import "windowscontracts.idl";
 import "windows.foundation.idl";
+import "windows.foundation.numerics.idl";
 
 namespace Windows.Gaming.Input.ForceFeedback {
     typedef enum ForceFeedbackEffectAxes ForceFeedbackEffectAxes;
     typedef enum ForceFeedbackEffectState ForceFeedbackEffectState;
     typedef enum ForceFeedbackLoadEffectResult ForceFeedbackLoadEffectResult;
+    typedef enum PeriodicForceEffectKind PeriodicForceEffectKind;
     interface IForceFeedbackEffect;
+    interface IPeriodicForceEffect;
+    interface IPeriodicForceEffectFactory;
     runtimeclass ForceFeedbackMotor;
+    runtimeclass PeriodicForceEffect;
 
     declare {
         interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>;
@@ -71,6 +76,16 @@ namespace Windows.Gaming.Input.ForceFeedback {
         EffectNotSupported = 2
     };
 
+    [contract(Windows.Foundation.UniversalApiContract, 3.0)]
+    enum PeriodicForceEffectKind
+    {
+        SquareWave       = 0,
+        SineWave         = 1,
+        TriangleWave     = 2,
+        SawtoothWaveUp   = 3,
+        SawtoothWaveDown = 4,
+    };
+
     [
         contract(Windows.Foundation.UniversalApiContract, 3.0),
         uuid(a17fba0c-2ae4-48c2-8063-eabd0777cb89)
@@ -108,6 +123,35 @@ namespace Windows.Gaming.Input.ForceFeedback {
                                      [out, retval] Windows.Foundation.IAsyncOperation<boolean> **async_op);
     }
 
+    [
+        contract(Windows.Foundation.UniversalApiContract, 3.0),
+        exclusiveto(Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect),
+        uuid(5c5138d7-fc75-4d52-9a0a-efe4cab5fe64)
+    ]
+    interface IPeriodicForceEffect : IInspectable
+        requires Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect
+    {
+        [propget] HRESULT Kind([out, retval] Windows.Gaming.Input.ForceFeedback.PeriodicForceEffectKind *value);
+        HRESULT SetParameters([in] Windows.Foundation.Numerics.Vector3 vector, [in] FLOAT frequency, [in] FLOAT phase,
+                              [in] FLOAT bias, [in] Windows.Foundation.TimeSpan duration);
+        HRESULT SetParametersWithEnvelope([in] Windows.Foundation.Numerics.Vector3 vector, [in] FLOAT frequency, [in] FLOAT phase,
+                                          [in] FLOAT bias, [in] FLOAT attack_gain, [in] FLOAT sustain_gain, [in] FLOAT release_gain,
+                                          [in] Windows.Foundation.TimeSpan start_delay, [in] Windows.Foundation.TimeSpan attack_duration,
+                                          [in] Windows.Foundation.TimeSpan sustain_duration, [in] Windows.Foundation.TimeSpan release_duration,
+                                          [in] UINT32 repeat_count);
+    }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 3.0),
+        exclusiveto(Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect),
+        uuid(6f62eb1a-9851-477b-b318-35ecaa15070f)
+    ]
+    interface IPeriodicForceEffectFactory : IInspectable
+    {
+        HRESULT CreateInstance([in] Windows.Gaming.Input.ForceFeedback.PeriodicForceEffectKind kind,
+                               [out, retval] Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect **value);
+    }
+
     [
         contract(Windows.Foundation.UniversalApiContract, 3.0),
         marshaling_behavior(agile),
@@ -117,4 +161,16 @@ namespace Windows.Gaming.Input.ForceFeedback {
     {
         [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackMotor;
     }
+
+    [
+        activatable(Windows.Gaming.Input.ForceFeedback.IPeriodicForceEffectFactory, Windows.Foundation.UniversalApiContract, 3.0),
+        contract(Windows.Foundation.UniversalApiContract, 3.0),
+        marshaling_behavior(agile),
+        threading(both)
+    ]
+    runtimeclass PeriodicForceEffect
+    {
+        [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect;
+        interface Windows.Gaming.Input.ForceFeedback.IPeriodicForceEffect;
+    }
 }




More information about the wine-cvs mailing list