wineps.drv: Remove DECLSPEC_HIDDEN usage.
[wine.git] / dlls / windows.gaming.input / provider.idl
blobe7b6e96b8aaebb87fabbddb9dcb2bae64fcb347d
1 /*
2 * Copyright 2022 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
19 #pragma makedep header
21 #ifdef __WIDL__
22 #pragma winrt ns_prefix
23 #endif
25 import "propidl.idl";
26 import "inspectable.idl";
27 import "asyncinfo.idl";
28 import "eventtoken.idl";
29 import "windowscontracts.idl";
30 import "windows.foundation.idl";
31 import "windows.gaming.input.idl";
32 import "windows.gaming.input.custom.idl";
33 import "windows.gaming.input.forcefeedback.idl";
35 namespace Windows.Gaming.Input.Custom {
36 typedef enum WineGameControllerType WineGameControllerType;
37 typedef enum WineForceFeedbackEffectType WineForceFeedbackEffectType;
38 typedef struct WineGameControllerState WineGameControllerState;
39 typedef struct WineGameControllerVibration WineGameControllerVibration;
40 typedef struct WineConditionEffectParameters WineConditionEffectParameters;
41 typedef struct WineConstantEffectParameters WineConstantEffectParameters;
42 typedef struct WineRampEffectParameters WineRampEffectParameters;
43 typedef struct WinePeriodicEffectParameters WinePeriodicEffectParameters;
44 typedef struct WineForceFeedbackEffectEnvelope WineForceFeedbackEffectEnvelope;
45 typedef union WineForceFeedbackEffectParameters WineForceFeedbackEffectParameters;
46 interface IWineGameControllerProvider;
47 runtimeclass WineGameControllerProvider;
49 /* type-pruning version of AsyncOperationCompletedHandler<T> */
50 delegate HRESULT WineAsyncOperationCompletedHandler([in] IInspectable *async, [in] AsyncStatus status);
52 enum WineGameControllerType
54 Joystick = 0,
55 Gamepad = 1,
56 RacingWheel = 2,
59 enum WineForceFeedbackEffectType
61 Constant = 1,
62 Ramp = 2,
64 Periodic = 10,
65 /* same order as PeriodicForceEffectKind */
66 Periodic_SquareWave = 10,
67 Periodic_SineWave = 11,
68 Periodic_TriangleWave = 12,
69 Periodic_SawtoothWaveUp = 13,
70 Periodic_SawtoothWaveDown = 14,
72 Condition = 20,
73 /* same order as ConditionForceEffectKind */
74 Condition_Spring = 20,
75 Condition_Damper = 21,
76 Condition_Inertia = 22,
77 Condition_Friction = 23,
80 struct WineGameControllerState
82 UINT64 timestamp;
83 DOUBLE axes[32];
84 BOOLEAN buttons[128];
85 Windows.Gaming.Input.GameControllerSwitchPosition switches[4];
88 struct WineGameControllerVibration
90 UINT16 rumble;
91 UINT16 buzz;
92 UINT16 left;
93 UINT16 right;
96 struct WineConditionEffectParameters
98 WineForceFeedbackEffectType type;
99 Windows.Foundation.Numerics.Vector3 direction;
100 FLOAT positive_coeff;
101 FLOAT negative_coeff;
102 FLOAT max_positive_magnitude;
103 FLOAT max_negative_magnitude;
104 FLOAT deadzone;
105 FLOAT bias;
108 struct WineConstantEffectParameters
110 WineForceFeedbackEffectType type;
111 Windows.Foundation.Numerics.Vector3 direction;
112 Windows.Foundation.TimeSpan duration;
113 Windows.Foundation.TimeSpan start_delay;
114 UINT32 repeat_count;
115 FLOAT gain;
118 struct WineRampEffectParameters
120 WineForceFeedbackEffectType type;
121 Windows.Foundation.Numerics.Vector3 start_vector;
122 Windows.Foundation.Numerics.Vector3 end_vector;
123 Windows.Foundation.TimeSpan duration;
124 Windows.Foundation.TimeSpan start_delay;
125 UINT32 repeat_count;
126 FLOAT gain;
129 struct WinePeriodicEffectParameters
131 WineForceFeedbackEffectType type;
132 Windows.Foundation.Numerics.Vector3 direction;
133 Windows.Foundation.TimeSpan duration;
134 Windows.Foundation.TimeSpan start_delay;
135 UINT32 repeat_count;
136 FLOAT frequency;
137 FLOAT phase;
138 FLOAT bias;
139 FLOAT gain;
142 struct WineForceFeedbackEffectEnvelope
144 FLOAT attack_gain;
145 FLOAT release_gain;
146 Windows.Foundation.TimeSpan attack_duration;
147 Windows.Foundation.TimeSpan release_duration;
150 union WineForceFeedbackEffectParameters
152 WineForceFeedbackEffectType type;
153 WineConditionEffectParameters condition;
154 WineConstantEffectParameters constant;
155 WineRampEffectParameters ramp;
156 WinePeriodicEffectParameters periodic;
160 uuid(06e58977-7684-4dc5-bad1-cda52a4aa06d)
162 interface IGameControllerImpl : IInspectable
163 requires Windows.Gaming.Input.Custom.IGameControllerInputSink
165 HRESULT Initialize([in] Windows.Gaming.Input.IGameController *outer,
166 [in] Windows.Gaming.Input.Custom.IGameControllerProvider *provider);
170 exclusiveto(Windows.Gaming.Input.Custom.WineGameControllerProvider),
171 uuid(8967b6ef-a4de-4b9a-984a-9f920b4d1b26)
173 interface IWineGameControllerProvider : IInspectable
174 requires Windows.Gaming.Input.Custom.IGameControllerProvider
176 [propget] HRESULT Type([out, retval] WineGameControllerType *value);
177 [propget] HRESULT AxisCount([out, retval] INT32 *value);
178 [propget] HRESULT ButtonCount([out, retval] INT32 *value);
179 [propget] HRESULT SwitchCount([out, retval] INT32 *value);
181 [propget] HRESULT State([out, retval] WineGameControllerState *state);
182 [propget] HRESULT Vibration([out, retval] WineGameControllerVibration *vibration);
183 [propput] HRESULT Vibration([in] WineGameControllerVibration vibration);
185 [propget] HRESULT ForceFeedbackMotor([out, retval] Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor **motor);
189 uuid(27833469-7760-417e-adbe-e011a66e16ee)
191 interface IWineForceFeedbackEffectImpl : IUnknown
192 requires Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect
194 [propput] HRESULT Parameters([in] WineForceFeedbackEffectParameters parameters,
195 [in, optional] WineForceFeedbackEffectEnvelope *envelope);
199 uuid(83f377ee-c799-11ec-9d64-0242ac120002)
201 interface IWineAsyncInfoImpl : IUnknown
203 [propput] HRESULT Completed([in] WineAsyncOperationCompletedHandler *handler);
204 [propget] HRESULT Completed([out, retval] WineAsyncOperationCompletedHandler **handler);
205 [propget] HRESULT Result([out, retval] PROPVARIANT *result);
206 HRESULT Start();
210 marshaling_behavior(agile),
211 threading(both)
213 runtimeclass WineGameControllerProvider
215 [default] interface Windows.Gaming.Input.Custom.IWineGameControllerProvider;
216 interface Windows.Gaming.Input.Custom.IGameControllerProvider;