windows.devices.haptics.idl 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * Copyright 2022 Rémi Bernon for CodeWeavers
  3. *
  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.
  8. *
  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.
  13. *
  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
  17. */
  18. #ifdef __WIDL__
  19. #pragma winrt ns_prefix
  20. #endif
  21. import "inspectable.idl";
  22. import "windows.foundation.idl";
  23. namespace Windows.Devices.Haptics {
  24. interface ISimpleHapticsControllerFeedback;
  25. interface ISimpleHapticsController;
  26. runtimeclass SimpleHapticsControllerFeedback;
  27. runtimeclass SimpleHapticsController;
  28. declare {
  29. interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.SimpleHapticsController *>;
  30. interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.SimpleHapticsControllerFeedback *>;
  31. }
  32. [
  33. contract(Windows.Foundation.UniversalApiContract, 4.0),
  34. exclusiveto(Windows.Devices.Haptics.SimpleHapticsControllerFeedback),
  35. uuid(3d577ef8-4cee-11e6-b535-001bdc06ab3b)
  36. ]
  37. interface ISimpleHapticsControllerFeedback : IInspectable
  38. {
  39. [propget] HRESULT Waveform([out, retval] UINT16 *value);
  40. [propget] HRESULT Duration([out, retval] Windows.Foundation.TimeSpan *value);
  41. }
  42. [
  43. contract(Windows.Foundation.UniversalApiContract, 4.0),
  44. exclusiveto(Windows.Devices.Haptics.SimpleHapticsController),
  45. uuid(3d577ef9-4cee-11e6-b535-001bdc06ab3b)
  46. ]
  47. interface ISimpleHapticsController : IInspectable
  48. {
  49. [propget] HRESULT Id([out, retval] HSTRING *value);
  50. [propget] HRESULT SupportedFeedback([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Haptics.SimpleHapticsControllerFeedback *> **value);
  51. [propget] HRESULT IsIntensitySupported([out, retval] boolean *value);
  52. [propget] HRESULT IsPlayCountSupported([out, retval] boolean *value);
  53. [propget] HRESULT IsPlayDurationSupported([out, retval] boolean *value);
  54. [propget] HRESULT IsReplayPauseIntervalSupported([out, retval] boolean *value);
  55. HRESULT StopFeedback();
  56. [overload("SendHapticFeedback")]
  57. HRESULT SendHapticFeedback([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback *feedback);
  58. [overload("SendHapticFeedback")]
  59. HRESULT SendHapticFeedbackWithIntensity([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback *feedback,
  60. [in] DOUBLE intensity);
  61. HRESULT SendHapticFeedbackForDuration([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback *feedback,
  62. [in] DOUBLE intensity, [in] Windows.Foundation.TimeSpan duration);
  63. HRESULT SendHapticFeedbackForPlayCount([in] Windows.Devices.Haptics.SimpleHapticsControllerFeedback *feedback,
  64. [in] DOUBLE intensity, [in] INT32 count,
  65. [in] Windows.Foundation.TimeSpan interval);
  66. }
  67. [
  68. contract(Windows.Foundation.UniversalApiContract, 4.0),
  69. marshaling_behavior(agile)
  70. ]
  71. runtimeclass SimpleHapticsControllerFeedback
  72. {
  73. [default] interface Windows.Devices.Haptics.ISimpleHapticsControllerFeedback;
  74. }
  75. [
  76. contract(Windows.Foundation.UniversalApiContract, 4.0),
  77. marshaling_behavior(agile)
  78. ]
  79. runtimeclass SimpleHapticsController
  80. {
  81. [default] interface Windows.Devices.Haptics.ISimpleHapticsController;
  82. }
  83. }