winegstreamer: Keep a IMFMediaSource pointer in the media stream.
[wine.git] / include / windows.gaming.input.custom.idl
blob8347f4663d300891ae18758b97c61ee3c094b53c
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 #ifdef __WIDL__
20 #pragma winrt ns_prefix
21 #endif
23 #ifndef DO_NO_IMPORTS
24 import "inspectable.idl";
25 import "asyncinfo.idl";
26 import "eventtoken.idl";
27 import "windowscontracts.idl";
28 import "windows.foundation.idl";
29 import "windows.gaming.input.idl";
30 import "windows.storage.streams.idl";
31 #endif
33 namespace Windows.Gaming.Input.Custom {
34 typedef enum XusbDeviceSubtype XusbDeviceSubtype;
35 typedef enum XusbDeviceType XusbDeviceType;
36 typedef struct GameControllerVersionInfo GameControllerVersionInfo;
37 interface IGameControllerInputSink;
38 interface IGameControllerProvider;
39 interface IHidGameControllerInputSink;
40 interface IHidGameControllerProvider;
41 interface IXusbGameControllerInputSink;
42 interface IXusbGameControllerProvider;
43 interface ICustomGameControllerFactory;
44 interface IGameControllerFactoryManagerStatics;
45 interface IGameControllerFactoryManagerStatics2;
46 runtimeclass GameControllerFactoryManager;
47 runtimeclass HidGameControllerProvider;
48 runtimeclass XusbGameControllerProvider;
50 [contract(Windows.Foundation.UniversalApiContract, 3.0)]
51 enum XusbDeviceSubtype
53 Unknown = 0,
54 Gamepad = 1,
55 ArcadePad = 2,
56 ArcadeStick = 3,
57 FlightStick = 4,
58 Wheel = 5,
59 Guitar = 6,
60 GuitarAlternate = 7,
61 GuitarBass = 8,
62 DrumKit = 9,
63 DancePad = 10,
66 [contract(Windows.Foundation.UniversalApiContract, 3.0)]
67 enum XusbDeviceType
69 Unknown = 0,
70 Gamepad = 1,
73 [contract(Windows.Foundation.UniversalApiContract, 3.0)]
74 struct GameControllerVersionInfo
76 UINT16 Major;
77 UINT16 Minor;
78 UINT16 Build;
79 UINT16 Revision;
83 contract(Windows.Foundation.UniversalApiContract, 3.0),
84 uuid(1ff6f922-c640-4c78-a820-9a715c558bcb)
86 interface IGameControllerInputSink : IInspectable
88 HRESULT OnInputResumed([in] UINT64 timestamp);
89 HRESULT OnInputSuspended([in] UINT64 timestamp);
93 contract(Windows.Foundation.UniversalApiContract, 3.0),
94 uuid(e6d73982-2996-4559-b16c-3e57d46e58d6)
96 interface IGameControllerProvider : IInspectable
98 [propget] HRESULT FirmwareVersionInfo([out, retval] Windows.Gaming.Input.Custom.GameControllerVersionInfo *value);
99 [propget] HRESULT HardwareProductId([out, retval] UINT16 *value);
100 [propget] HRESULT HardwareVendorId([out, retval] UINT16 *value);
101 [propget] HRESULT HardwareVersionInfo([out, retval] Windows.Gaming.Input.Custom.GameControllerVersionInfo *value);
102 [propget] HRESULT IsConnected([out, retval] boolean *value);
106 contract(Windows.Foundation.UniversalApiContract, 4.0),
107 uuid(f754c322-182d-40e4-a126-fcee4ffa1e31)
109 interface IHidGameControllerInputSink : IInspectable
110 requires Windows.Gaming.Input.Custom.IGameControllerInputSink
112 HRESULT OnInputReportReceived([in] UINT64 timestamp, [in] BYTE id, [in] UINT32 report_len,
113 [in, size_is(report_len)] BYTE *report_buf);
117 contract(Windows.Foundation.UniversalApiContract, 4.0),
118 exclusiveto(Windows.Gaming.Input.Custom.HidGameControllerProvider),
119 uuid(95ce3af4-abf0-4b68-a081-3b7de73ff0e7)
121 interface IHidGameControllerProvider : IInspectable
122 requires Windows.Gaming.Input.Custom.IGameControllerProvider
124 [propget] HRESULT UsageId([out, retval] UINT16 *value);
125 [propget] HRESULT UsagePage([out, retval] UINT16 *value);
126 HRESULT GetFeatureReport([in] BYTE id, [in] UINT32 report_len,
127 [out, size_is(report_len)] BYTE *report_buf);
128 HRESULT SendFeatureReport([in] BYTE id, [in] UINT32 report_len,
129 [in, size_is(report_len)] BYTE *report_buf);
130 HRESULT SendOutputReport([in] BYTE id, [in] UINT32 report_len,
131 [in, size_is(report_len)] BYTE *report_buf);
135 contract(Windows.Foundation.UniversalApiContract, 3.0),
136 uuid(b2ac1d95-6ecb-42b3-8aab-025401ca4712)
138 interface IXusbGameControllerInputSink : IInspectable
139 requires Windows.Gaming.Input.Custom.IGameControllerInputSink
141 HRESULT OnInputReceived([in] UINT64 timestamp, [in] BYTE id, [in] UINT32 report_len,
142 [in, size_is(report_len)] BYTE *report_buf);
146 contract(Windows.Foundation.UniversalApiContract, 3.0),
147 exclusiveto(Windows.Gaming.Input.Custom.XusbGameControllerProvider),
148 uuid(6e2971eb-0efb-48b4-808b-837643b2f216)
150 interface IXusbGameControllerProvider : IInspectable
151 requires Windows.Gaming.Input.Custom.IGameControllerProvider
153 HRESULT SetVibration([in] DOUBLE rumble_intensity, [in] DOUBLE buzz_intensity);
157 contract(Windows.Foundation.UniversalApiContract, 3.0),
158 uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f)
160 interface ICustomGameControllerFactory : IInspectable
162 HRESULT CreateGameController([in] Windows.Gaming.Input.Custom.IGameControllerProvider *provider,
163 [out, retval] IInspectable **value);
164 HRESULT OnGameControllerAdded([in] Windows.Gaming.Input.IGameController *value);
165 HRESULT OnGameControllerRemoved([in] Windows.Gaming.Input.IGameController *value);
169 contract(Windows.Foundation.UniversalApiContract, 3.0),
170 exclusiveto(Windows.Gaming.Input.Custom.GameControllerFactoryManager),
171 uuid(36cb66e3-d0a1-4986-a24c-40b137deba9e)
173 interface IGameControllerFactoryManagerStatics : IInspectable
175 HRESULT RegisterCustomFactoryForGipInterface([in] Windows.Gaming.Input.Custom.ICustomGameControllerFactory *factory,
176 [in] GUID interfaceId);
177 HRESULT RegisterCustomFactoryForHardwareId([in] Windows.Gaming.Input.Custom.ICustomGameControllerFactory *factory,
178 [in] UINT16 vendor_id, [in] UINT16 product_id);
179 HRESULT RegisterCustomFactoryForXusbType([in] Windows.Gaming.Input.Custom.ICustomGameControllerFactory *factory,
180 [in] Windows.Gaming.Input.Custom.XusbDeviceType type,
181 [in] Windows.Gaming.Input.Custom.XusbDeviceSubtype subtype);
185 contract(Windows.Foundation.UniversalApiContract, 4.0),
186 exclusiveto(Windows.Gaming.Input.Custom.GameControllerFactoryManager),
187 uuid(eace5644-19df-4115-b32a-2793e2aea3bb)
189 interface IGameControllerFactoryManagerStatics2 : IInspectable
190 requires Windows.Gaming.Input.Custom.IGameControllerFactoryManagerStatics
192 HRESULT TryGetFactoryControllerFromGameController([in] Windows.Gaming.Input.Custom.ICustomGameControllerFactory *factory,
193 [in] Windows.Gaming.Input.IGameController *controller,
194 [out, retval] Windows.Gaming.Input.IGameController **value);
198 contract(Windows.Foundation.UniversalApiContract, 3.0),
199 marshaling_behavior(agile),
200 static(Windows.Gaming.Input.Custom.IGameControllerFactoryManagerStatics, Windows.Foundation.UniversalApiContract, 3.0),
201 static(Windows.Gaming.Input.Custom.IGameControllerFactoryManagerStatics2, Windows.Foundation.UniversalApiContract, 4.0),
202 threading(both)
204 runtimeclass GameControllerFactoryManager
209 contract(Windows.Foundation.UniversalApiContract, 4.0),
210 marshaling_behavior(agile),
211 threading(both)
213 runtimeclass HidGameControllerProvider
215 [default] interface Windows.Gaming.Input.Custom.IHidGameControllerProvider;
216 interface Windows.Gaming.Input.Custom.IGameControllerProvider;
220 contract(Windows.Foundation.UniversalApiContract, 3.0),
221 marshaling_behavior(agile),
222 threading(both)
224 runtimeclass XusbGameControllerProvider
226 [default] interface Windows.Gaming.Input.Custom.IXusbGameControllerProvider;
227 interface Windows.Gaming.Input.Custom.IGameControllerProvider;