Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
The Xusb interfaces aren't really required as I don't intend to use them in the implementation, but I'll use the IIDs to check how the providers are supposed to be implemented.
include/windows.gaming.input.custom.idl | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl index fe20ce3d0cc..93e5866a324 100644 --- a/include/windows.gaming.input.custom.idl +++ b/include/windows.gaming.input.custom.idl @@ -34,6 +34,7 @@ namespace Windows.Gaming.Input.Custom { typedef enum XusbDeviceSubtype XusbDeviceSubtype; typedef enum XusbDeviceType XusbDeviceType; typedef struct GameControllerVersionInfo GameControllerVersionInfo; + interface IGameControllerInputSink; interface IGameControllerProvider; interface ICustomGameControllerFactory; interface IGameControllerFactoryManagerStatics; @@ -72,6 +73,16 @@ namespace Windows.Gaming.Input.Custom { UINT16 Revision; };
+ [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + uuid(1ff6f922-c640-4c78-a820-9a715c558bcb) + ] + interface IGameControllerInputSink : IInspectable + { + HRESULT OnInputResumed([in] UINT64 timestamp); + HRESULT OnInputSuspended([in] UINT64 timestamp); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), uuid(e6d73982-2996-4559-b16c-3e57d46e58d6)
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- include/windows.gaming.input.custom.idl | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl index 93e5866a324..5a3e94aa978 100644 --- a/include/windows.gaming.input.custom.idl +++ b/include/windows.gaming.input.custom.idl @@ -36,6 +36,7 @@ namespace Windows.Gaming.Input.Custom { typedef struct GameControllerVersionInfo GameControllerVersionInfo; interface IGameControllerInputSink; interface IGameControllerProvider; + interface IHidGameControllerInputSink; interface ICustomGameControllerFactory; interface IGameControllerFactoryManagerStatics; interface IGameControllerFactoryManagerStatics2; @@ -96,6 +97,17 @@ namespace Windows.Gaming.Input.Custom { [propget] HRESULT IsConnected([out, retval] boolean *value); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + uuid(f754c322-182d-40e4-a126-fcee4ffa1e31) + ] + interface IHidGameControllerInputSink : IInspectable + requires Windows.Gaming.Input.Custom.IGameControllerInputSink + { + HRESULT OnInputReportReceived([in] UINT64 timestamp, [in] BYTE id, [in] UINT32 report_len, + [in, size_is(report_len)] BYTE *report_buf); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f)
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- include/windows.gaming.input.custom.idl | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl index 5a3e94aa978..e30b383e9d7 100644 --- a/include/windows.gaming.input.custom.idl +++ b/include/windows.gaming.input.custom.idl @@ -37,10 +37,12 @@ namespace Windows.Gaming.Input.Custom { interface IGameControllerInputSink; interface IGameControllerProvider; interface IHidGameControllerInputSink; + interface IHidGameControllerProvider; interface ICustomGameControllerFactory; interface IGameControllerFactoryManagerStatics; interface IGameControllerFactoryManagerStatics2; runtimeclass GameControllerFactoryManager; + runtimeclass HidGameControllerProvider;
[contract(Windows.Foundation.UniversalApiContract, 3.0)] enum XusbDeviceSubtype @@ -108,6 +110,24 @@ namespace Windows.Gaming.Input.Custom { [in, size_is(report_len)] BYTE *report_buf); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + exclusiveto(Windows.Gaming.Input.Custom.HidGameControllerProvider), + uuid(95ce3af4-abf0-4b68-a081-3b7de73ff0e7) + ] + interface IHidGameControllerProvider : IInspectable + requires Windows.Gaming.Input.Custom.IGameControllerProvider + { + [propget] HRESULT UsageId([out, retval] UINT16 *value); + [propget] HRESULT UsagePage([out, retval] UINT16 *value); + HRESULT GetFeatureReport([in] BYTE id, [in] UINT32 report_len, + [out, size_is(report_len)] BYTE *report_buf); + HRESULT SendFeatureReport([in] BYTE id, [in] UINT32 report_len, + [in, size_is(report_len)] BYTE *report_buf); + HRESULT SendOutputReport([in] BYTE id, [in] UINT32 report_len, + [in, size_is(report_len)] BYTE *report_buf); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f) @@ -159,4 +179,15 @@ namespace Windows.Gaming.Input.Custom { runtimeclass GameControllerFactoryManager { } + + [ + contract(Windows.Foundation.UniversalApiContract, 4.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass HidGameControllerProvider + { + [default] interface Windows.Gaming.Input.Custom.IHidGameControllerProvider; + interface Windows.Gaming.Input.Custom.IGameControllerProvider; + } }
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- include/windows.gaming.input.custom.idl | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl index e30b383e9d7..001dbc36509 100644 --- a/include/windows.gaming.input.custom.idl +++ b/include/windows.gaming.input.custom.idl @@ -38,6 +38,7 @@ namespace Windows.Gaming.Input.Custom { interface IGameControllerProvider; interface IHidGameControllerInputSink; interface IHidGameControllerProvider; + interface IXusbGameControllerInputSink; interface ICustomGameControllerFactory; interface IGameControllerFactoryManagerStatics; interface IGameControllerFactoryManagerStatics2; @@ -128,6 +129,17 @@ namespace Windows.Gaming.Input.Custom { [in, size_is(report_len)] BYTE *report_buf); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + uuid(b2ac1d95-6ecb-42b3-8aab-025401ca4712) + ] + interface IXusbGameControllerInputSink : IInspectable + requires Windows.Gaming.Input.Custom.IGameControllerInputSink + { + HRESULT OnInputReceived([in] UINT64 timestamp, [in] BYTE id, [in] UINT32 report_len, + [in, size_is(report_len)] BYTE *report_buf); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f)
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- include/windows.gaming.input.custom.idl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
diff --git a/include/windows.gaming.input.custom.idl b/include/windows.gaming.input.custom.idl index 001dbc36509..8347f4663d3 100644 --- a/include/windows.gaming.input.custom.idl +++ b/include/windows.gaming.input.custom.idl @@ -39,11 +39,13 @@ namespace Windows.Gaming.Input.Custom { interface IHidGameControllerInputSink; interface IHidGameControllerProvider; interface IXusbGameControllerInputSink; + interface IXusbGameControllerProvider; interface ICustomGameControllerFactory; interface IGameControllerFactoryManagerStatics; interface IGameControllerFactoryManagerStatics2; runtimeclass GameControllerFactoryManager; runtimeclass HidGameControllerProvider; + runtimeclass XusbGameControllerProvider;
[contract(Windows.Foundation.UniversalApiContract, 3.0)] enum XusbDeviceSubtype @@ -140,6 +142,17 @@ namespace Windows.Gaming.Input.Custom { [in, size_is(report_len)] BYTE *report_buf); }
+ [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + exclusiveto(Windows.Gaming.Input.Custom.XusbGameControllerProvider), + uuid(6e2971eb-0efb-48b4-808b-837643b2f216) + ] + interface IXusbGameControllerProvider : IInspectable + requires Windows.Gaming.Input.Custom.IGameControllerProvider + { + HRESULT SetVibration([in] DOUBLE rumble_intensity, [in] DOUBLE buzz_intensity); + } + [ contract(Windows.Foundation.UniversalApiContract, 3.0), uuid(69a0ae5e-758e-4cbe-ace6-62155fe9126f) @@ -202,4 +215,15 @@ namespace Windows.Gaming.Input.Custom { [default] interface Windows.Gaming.Input.Custom.IHidGameControllerProvider; interface Windows.Gaming.Input.Custom.IGameControllerProvider; } + + [ + contract(Windows.Foundation.UniversalApiContract, 3.0), + marshaling_behavior(agile), + threading(both) + ] + runtimeclass XusbGameControllerProvider + { + [default] interface Windows.Gaming.Input.Custom.IXusbGameControllerProvider; + interface Windows.Gaming.Input.Custom.IGameControllerProvider; + } }