[PATCH 3/5] include: Add Windows.Gaming.Input.ForceFeedback.ConditionForceEffect runtimeclass declaration.

Rémi Bernon rbernon at codeweavers.com
Wed Apr 27 01:26:32 CDT 2022


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 .../windows.gaming.input.forcefeedback.idl    | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/include/windows.gaming.input.forcefeedback.idl b/include/windows.gaming.input.forcefeedback.idl
index e02c136e562..ad3290f1a5c 100644
--- a/include/windows.gaming.input.forcefeedback.idl
+++ b/include/windows.gaming.input.forcefeedback.idl
@@ -32,11 +32,15 @@ namespace Windows.Gaming.Input.ForceFeedback {
     typedef enum ForceFeedbackEffectState ForceFeedbackEffectState;
     typedef enum ForceFeedbackLoadEffectResult ForceFeedbackLoadEffectResult;
     typedef enum PeriodicForceEffectKind PeriodicForceEffectKind;
+    typedef enum ConditionForceEffectKind ConditionForceEffectKind;
     interface IForceFeedbackEffect;
     interface IPeriodicForceEffect;
     interface IPeriodicForceEffectFactory;
+    interface IConditionForceEffect;
+    interface IConditionForceEffectFactory;
     runtimeclass ForceFeedbackMotor;
     runtimeclass PeriodicForceEffect;
+    runtimeclass ConditionForceEffect;
 
     declare {
         interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Gaming.Input.ForceFeedback.ForceFeedbackLoadEffectResult>;
@@ -86,6 +90,15 @@ namespace Windows.Gaming.Input.ForceFeedback {
         SawtoothWaveDown = 4,
     };
 
+    [contract(Windows.Foundation.UniversalApiContract, 3.0)]
+    enum ConditionForceEffectKind
+    {
+        Spring   = 0,
+        Damper   = 1,
+        Inertia  = 2,
+        Friction = 3,
+    };
+
     [
         contract(Windows.Foundation.UniversalApiContract, 3.0),
         uuid(a17fba0c-2ae4-48c2-8063-eabd0777cb89)
@@ -152,6 +165,31 @@ namespace Windows.Gaming.Input.ForceFeedback {
                                [out, retval] Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect **value);
     }
 
+    [
+        contract(Windows.Foundation.UniversalApiContract, 3.0),
+        exclusiveto(Windows.Gaming.Input.ForceFeedback.ConditionForceEffect),
+        uuid(32d1ea68-3695-4e69-85c0-cd1944189140)
+    ]
+    interface IConditionForceEffect : IInspectable
+        requires Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect
+    {
+        [propget] HRESULT Kind([out, retval] Windows.Gaming.Input.ForceFeedback.ConditionForceEffectKind *value);
+        HRESULT SetParameters([in] Windows.Foundation.Numerics.Vector3 direction, [in] FLOAT positive_coeff,
+                              [in] FLOAT negative_coeff, [in] FLOAT max_positive_magnitude, [in] FLOAT max_negative_magnitude,
+                              [in] FLOAT deadzone, [in] FLOAT bias);
+    }
+
+    [
+        contract(Windows.Foundation.UniversalApiContract, 3.0),
+        exclusiveto(Windows.Gaming.Input.ForceFeedback.ConditionForceEffect),
+        uuid(91a99264-1810-4eb6-a773-bfd3b8cddbab)
+    ]
+    interface IConditionForceEffectFactory : IInspectable
+    {
+        HRESULT CreateInstance([in] Windows.Gaming.Input.ForceFeedback.ConditionForceEffectKind kind,
+                               [out, retval] Windows.Gaming.Input.ForceFeedback.ConditionForceEffect **value);
+    }
+
     [
         contract(Windows.Foundation.UniversalApiContract, 3.0),
         marshaling_behavior(agile),
@@ -173,4 +211,16 @@ namespace Windows.Gaming.Input.ForceFeedback {
         [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect;
         interface Windows.Gaming.Input.ForceFeedback.IPeriodicForceEffect;
     }
+
+    [
+        activatable(Windows.Gaming.Input.ForceFeedback.IConditionForceEffectFactory, Windows.Foundation.UniversalApiContract, 3.0),
+        contract(Windows.Foundation.UniversalApiContract, 3.0),
+        marshaling_behavior(agile),
+        threading(both)
+    ]
+    runtimeclass ConditionForceEffect
+    {
+        [default] interface Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect;
+        interface Windows.Gaming.Input.ForceFeedback.IConditionForceEffect;
+    }
 }
-- 
2.35.1




More information about the wine-devel mailing list