winrt-Windows.Gaming.Input.ForceFeedback 2.1.0__tar.gz → 2.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/PKG-INFO +5 -5
  2. winrt_windows_gaming_input_forcefeedback-2.3.0/all-requirements.txt +4 -0
  3. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/py.Windows.Gaming.Input.ForceFeedback.cpp +393 -58
  4. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/pyproject.toml +3 -2
  5. winrt_windows_gaming_input_forcefeedback-2.3.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/requirements.txt +2 -2
  7. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt/_winrt_windows_gaming_input_forcefeedback.pyi +1 -1
  8. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt/windows/gaming/input/forcefeedback/__init__.py +1 -1
  9. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt_Windows.Gaming.Input.ForceFeedback.egg-info/PKG-INFO +5 -5
  10. winrt_windows_gaming_input_forcefeedback-2.3.0/winrt_Windows.Gaming.Input.ForceFeedback.egg-info/requires.txt +5 -0
  11. winrt_windows_gaming_input_forcefeedback-2.1.0/all-requirements.txt +0 -4
  12. winrt_windows_gaming_input_forcefeedback-2.1.0/pywinrt-version.txt +0 -1
  13. winrt_windows_gaming_input_forcefeedback-2.1.0/winrt_Windows.Gaming.Input.ForceFeedback.egg-info/requires.txt +0 -5
  14. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/README.md +0 -0
  15. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/setup.cfg +0 -0
  16. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/setup.py +0 -0
  17. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt/windows/gaming/input/forcefeedback/py.typed +0 -0
  18. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt_Windows.Gaming.Input.ForceFeedback.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt_Windows.Gaming.Input.ForceFeedback.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_gaming_input_forcefeedback-2.1.0 → winrt_windows_gaming_input_forcefeedback-2.3.0}/winrt_Windows.Gaming.Input.ForceFeedback.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Gaming.Input.ForceFeedback
3
- Version: 2.1.0
3
+ Version: 2.3.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,12 +10,12 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.1.0
15
+ Requires-Dist: winrt-runtime==2.3.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Numerics[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.3.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Numerics[all]==2.3.0; extra == "all"
19
19
 
20
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
21
21
 
@@ -0,0 +1,4 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
+
3
+ winrt-Windows.Foundation[all]==2.3.0
4
+ winrt-Windows.Foundation.Numerics[all]==2.3.0
@@ -1,4 +1,4 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
3
  #include "py.Windows.Gaming.Input.ForceFeedback.h"
4
4
 
@@ -21,7 +21,7 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
21
21
  {
22
22
  auto param0 = py::convert_to<winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffectKind>(args, 0);
23
23
 
24
- winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect instance{ param0 };
24
+ winrt::Windows::Gaming::Input::ForceFeedback::ConditionForceEffect instance{param0};
25
25
  return py::wrap(instance, type);
26
26
  }
27
27
  catch (...)
@@ -53,7 +53,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
53
53
  {
54
54
  try
55
55
  {
56
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"SetParameters", 7))
56
+ static std::optional<bool> is_overload_present{};
57
+
58
+ if (!is_overload_present.has_value())
59
+ {
60
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"SetParameters", 7);
61
+ }
62
+
63
+ if (!is_overload_present.value())
57
64
  {
58
65
  py::set_arg_count_version_error(7);
59
66
  return nullptr;
@@ -91,7 +98,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
91
98
  {
92
99
  try
93
100
  {
94
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Start", 0))
101
+ static std::optional<bool> is_overload_present{};
102
+
103
+ if (!is_overload_present.has_value())
104
+ {
105
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Start", 0);
106
+ }
107
+
108
+ if (!is_overload_present.value())
95
109
  {
96
110
  py::set_arg_count_version_error(0);
97
111
  return nullptr;
@@ -121,7 +135,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
121
135
  {
122
136
  try
123
137
  {
124
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Stop", 0))
138
+ static std::optional<bool> is_overload_present{};
139
+
140
+ if (!is_overload_present.has_value())
141
+ {
142
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Stop", 0);
143
+ }
144
+
145
+ if (!is_overload_present.value())
125
146
  {
126
147
  py::set_arg_count_version_error(0);
127
148
  return nullptr;
@@ -147,7 +168,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
147
168
  {
148
169
  try
149
170
  {
150
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Kind"))
171
+ static std::optional<bool> is_property_present{};
172
+
173
+ if (!is_property_present.has_value())
174
+ {
175
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Kind");
176
+ }
177
+
178
+ if (!is_property_present.value())
151
179
  {
152
180
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
153
181
  return nullptr;
@@ -166,7 +194,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
166
194
  {
167
195
  try
168
196
  {
169
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Gain"))
197
+ static std::optional<bool> is_property_present{};
198
+
199
+ if (!is_property_present.has_value())
200
+ {
201
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Gain");
202
+ }
203
+
204
+ if (!is_property_present.value())
170
205
  {
171
206
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
172
207
  return nullptr;
@@ -191,7 +226,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
191
226
 
192
227
  try
193
228
  {
194
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Gain"))
229
+ static std::optional<bool> is_property_present{};
230
+
231
+ if (!is_property_present.has_value())
232
+ {
233
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"Gain");
234
+ }
235
+
236
+ if (!is_property_present.value())
195
237
  {
196
238
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
197
239
  return -1;
@@ -213,7 +255,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
213
255
  {
214
256
  try
215
257
  {
216
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"State"))
258
+ static std::optional<bool> is_property_present{};
259
+
260
+ if (!is_property_present.has_value())
261
+ {
262
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConditionForceEffect", L"State");
263
+ }
264
+
265
+ if (!is_property_present.value())
217
266
  {
218
267
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
219
268
  return nullptr;
@@ -298,7 +347,7 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
298
347
  {
299
348
  try
300
349
  {
301
- winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect instance{ };
350
+ winrt::Windows::Gaming::Input::ForceFeedback::ConstantForceEffect instance{};
302
351
  return py::wrap(instance, type);
303
352
  }
304
353
  catch (...)
@@ -330,7 +379,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
330
379
  {
331
380
  try
332
381
  {
333
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"SetParameters", 2))
382
+ static std::optional<bool> is_overload_present{};
383
+
384
+ if (!is_overload_present.has_value())
385
+ {
386
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"SetParameters", 2);
387
+ }
388
+
389
+ if (!is_overload_present.value())
334
390
  {
335
391
  py::set_arg_count_version_error(2);
336
392
  return nullptr;
@@ -363,7 +419,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
363
419
  {
364
420
  try
365
421
  {
366
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"SetParametersWithEnvelope", 9))
422
+ static std::optional<bool> is_overload_present{};
423
+
424
+ if (!is_overload_present.has_value())
425
+ {
426
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"SetParametersWithEnvelope", 9);
427
+ }
428
+
429
+ if (!is_overload_present.value())
367
430
  {
368
431
  py::set_arg_count_version_error(9);
369
432
  return nullptr;
@@ -403,7 +466,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
403
466
  {
404
467
  try
405
468
  {
406
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Start", 0))
469
+ static std::optional<bool> is_overload_present{};
470
+
471
+ if (!is_overload_present.has_value())
472
+ {
473
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Start", 0);
474
+ }
475
+
476
+ if (!is_overload_present.value())
407
477
  {
408
478
  py::set_arg_count_version_error(0);
409
479
  return nullptr;
@@ -433,7 +503,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
433
503
  {
434
504
  try
435
505
  {
436
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Stop", 0))
506
+ static std::optional<bool> is_overload_present{};
507
+
508
+ if (!is_overload_present.has_value())
509
+ {
510
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Stop", 0);
511
+ }
512
+
513
+ if (!is_overload_present.value())
437
514
  {
438
515
  py::set_arg_count_version_error(0);
439
516
  return nullptr;
@@ -459,7 +536,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
459
536
  {
460
537
  try
461
538
  {
462
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Gain"))
539
+ static std::optional<bool> is_property_present{};
540
+
541
+ if (!is_property_present.has_value())
542
+ {
543
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Gain");
544
+ }
545
+
546
+ if (!is_property_present.value())
463
547
  {
464
548
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
465
549
  return nullptr;
@@ -484,7 +568,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
484
568
 
485
569
  try
486
570
  {
487
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Gain"))
571
+ static std::optional<bool> is_property_present{};
572
+
573
+ if (!is_property_present.has_value())
574
+ {
575
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"Gain");
576
+ }
577
+
578
+ if (!is_property_present.value())
488
579
  {
489
580
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
490
581
  return -1;
@@ -506,7 +597,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
506
597
  {
507
598
  try
508
599
  {
509
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"State"))
600
+ static std::optional<bool> is_property_present{};
601
+
602
+ if (!is_property_present.has_value())
603
+ {
604
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ConstantForceEffect", L"State");
605
+ }
606
+
607
+ if (!is_property_present.value())
510
608
  {
511
609
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
512
610
  return nullptr;
@@ -601,7 +699,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
601
699
  {
602
700
  try
603
701
  {
604
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"LoadEffectAsync", 1))
702
+ static std::optional<bool> is_overload_present{};
703
+
704
+ if (!is_overload_present.has_value())
705
+ {
706
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"LoadEffectAsync", 1);
707
+ }
708
+
709
+ if (!is_overload_present.value())
605
710
  {
606
711
  py::set_arg_count_version_error(1);
607
712
  return nullptr;
@@ -632,7 +737,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
632
737
  {
633
738
  try
634
739
  {
635
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"PauseAllEffects", 0))
740
+ static std::optional<bool> is_overload_present{};
741
+
742
+ if (!is_overload_present.has_value())
743
+ {
744
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"PauseAllEffects", 0);
745
+ }
746
+
747
+ if (!is_overload_present.value())
636
748
  {
637
749
  py::set_arg_count_version_error(0);
638
750
  return nullptr;
@@ -662,7 +774,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
662
774
  {
663
775
  try
664
776
  {
665
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"ResumeAllEffects", 0))
777
+ static std::optional<bool> is_overload_present{};
778
+
779
+ if (!is_overload_present.has_value())
780
+ {
781
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"ResumeAllEffects", 0);
782
+ }
783
+
784
+ if (!is_overload_present.value())
666
785
  {
667
786
  py::set_arg_count_version_error(0);
668
787
  return nullptr;
@@ -692,7 +811,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
692
811
  {
693
812
  try
694
813
  {
695
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"StopAllEffects", 0))
814
+ static std::optional<bool> is_overload_present{};
815
+
816
+ if (!is_overload_present.has_value())
817
+ {
818
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"StopAllEffects", 0);
819
+ }
820
+
821
+ if (!is_overload_present.value())
696
822
  {
697
823
  py::set_arg_count_version_error(0);
698
824
  return nullptr;
@@ -722,7 +848,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
722
848
  {
723
849
  try
724
850
  {
725
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryDisableAsync", 0))
851
+ static std::optional<bool> is_overload_present{};
852
+
853
+ if (!is_overload_present.has_value())
854
+ {
855
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryDisableAsync", 0);
856
+ }
857
+
858
+ if (!is_overload_present.value())
726
859
  {
727
860
  py::set_arg_count_version_error(0);
728
861
  return nullptr;
@@ -751,7 +884,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
751
884
  {
752
885
  try
753
886
  {
754
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryEnableAsync", 0))
887
+ static std::optional<bool> is_overload_present{};
888
+
889
+ if (!is_overload_present.has_value())
890
+ {
891
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryEnableAsync", 0);
892
+ }
893
+
894
+ if (!is_overload_present.value())
755
895
  {
756
896
  py::set_arg_count_version_error(0);
757
897
  return nullptr;
@@ -780,7 +920,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
780
920
  {
781
921
  try
782
922
  {
783
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryResetAsync", 0))
923
+ static std::optional<bool> is_overload_present{};
924
+
925
+ if (!is_overload_present.has_value())
926
+ {
927
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryResetAsync", 0);
928
+ }
929
+
930
+ if (!is_overload_present.value())
784
931
  {
785
932
  py::set_arg_count_version_error(0);
786
933
  return nullptr;
@@ -809,7 +956,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
809
956
  {
810
957
  try
811
958
  {
812
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryUnloadEffectAsync", 1))
959
+ static std::optional<bool> is_overload_present{};
960
+
961
+ if (!is_overload_present.has_value())
962
+ {
963
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"TryUnloadEffectAsync", 1);
964
+ }
965
+
966
+ if (!is_overload_present.value())
813
967
  {
814
968
  py::set_arg_count_version_error(1);
815
969
  return nullptr;
@@ -836,7 +990,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
836
990
  {
837
991
  try
838
992
  {
839
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"MasterGain"))
993
+ static std::optional<bool> is_property_present{};
994
+
995
+ if (!is_property_present.has_value())
996
+ {
997
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"MasterGain");
998
+ }
999
+
1000
+ if (!is_property_present.value())
840
1001
  {
841
1002
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
842
1003
  return nullptr;
@@ -861,7 +1022,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
861
1022
 
862
1023
  try
863
1024
  {
864
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"MasterGain"))
1025
+ static std::optional<bool> is_property_present{};
1026
+
1027
+ if (!is_property_present.has_value())
1028
+ {
1029
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"MasterGain");
1030
+ }
1031
+
1032
+ if (!is_property_present.value())
865
1033
  {
866
1034
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
867
1035
  return -1;
@@ -883,7 +1051,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
883
1051
  {
884
1052
  try
885
1053
  {
886
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"AreEffectsPaused"))
1054
+ static std::optional<bool> is_property_present{};
1055
+
1056
+ if (!is_property_present.has_value())
1057
+ {
1058
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"AreEffectsPaused");
1059
+ }
1060
+
1061
+ if (!is_property_present.value())
887
1062
  {
888
1063
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
889
1064
  return nullptr;
@@ -902,7 +1077,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
902
1077
  {
903
1078
  try
904
1079
  {
905
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"IsEnabled"))
1080
+ static std::optional<bool> is_property_present{};
1081
+
1082
+ if (!is_property_present.has_value())
1083
+ {
1084
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"IsEnabled");
1085
+ }
1086
+
1087
+ if (!is_property_present.value())
906
1088
  {
907
1089
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
908
1090
  return nullptr;
@@ -921,7 +1103,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
921
1103
  {
922
1104
  try
923
1105
  {
924
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"SupportedAxes"))
1106
+ static std::optional<bool> is_property_present{};
1107
+
1108
+ if (!is_property_present.has_value())
1109
+ {
1110
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.ForceFeedbackMotor", L"SupportedAxes");
1111
+ }
1112
+
1113
+ if (!is_property_present.value())
925
1114
  {
926
1115
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
927
1116
  return nullptr;
@@ -1014,7 +1203,7 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1014
1203
  {
1015
1204
  auto param0 = py::convert_to<winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffectKind>(args, 0);
1016
1205
 
1017
- winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect instance{ param0 };
1206
+ winrt::Windows::Gaming::Input::ForceFeedback::PeriodicForceEffect instance{param0};
1018
1207
  return py::wrap(instance, type);
1019
1208
  }
1020
1209
  catch (...)
@@ -1046,7 +1235,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1046
1235
  {
1047
1236
  try
1048
1237
  {
1049
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"SetParameters", 5))
1238
+ static std::optional<bool> is_overload_present{};
1239
+
1240
+ if (!is_overload_present.has_value())
1241
+ {
1242
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"SetParameters", 5);
1243
+ }
1244
+
1245
+ if (!is_overload_present.value())
1050
1246
  {
1051
1247
  py::set_arg_count_version_error(5);
1052
1248
  return nullptr;
@@ -1082,7 +1278,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1082
1278
  {
1083
1279
  try
1084
1280
  {
1085
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"SetParametersWithEnvelope", 12))
1281
+ static std::optional<bool> is_overload_present{};
1282
+
1283
+ if (!is_overload_present.has_value())
1284
+ {
1285
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"SetParametersWithEnvelope", 12);
1286
+ }
1287
+
1288
+ if (!is_overload_present.value())
1086
1289
  {
1087
1290
  py::set_arg_count_version_error(12);
1088
1291
  return nullptr;
@@ -1125,7 +1328,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1125
1328
  {
1126
1329
  try
1127
1330
  {
1128
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Start", 0))
1331
+ static std::optional<bool> is_overload_present{};
1332
+
1333
+ if (!is_overload_present.has_value())
1334
+ {
1335
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Start", 0);
1336
+ }
1337
+
1338
+ if (!is_overload_present.value())
1129
1339
  {
1130
1340
  py::set_arg_count_version_error(0);
1131
1341
  return nullptr;
@@ -1155,7 +1365,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1155
1365
  {
1156
1366
  try
1157
1367
  {
1158
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Stop", 0))
1368
+ static std::optional<bool> is_overload_present{};
1369
+
1370
+ if (!is_overload_present.has_value())
1371
+ {
1372
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Stop", 0);
1373
+ }
1374
+
1375
+ if (!is_overload_present.value())
1159
1376
  {
1160
1377
  py::set_arg_count_version_error(0);
1161
1378
  return nullptr;
@@ -1181,7 +1398,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1181
1398
  {
1182
1399
  try
1183
1400
  {
1184
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Gain"))
1401
+ static std::optional<bool> is_property_present{};
1402
+
1403
+ if (!is_property_present.has_value())
1404
+ {
1405
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Gain");
1406
+ }
1407
+
1408
+ if (!is_property_present.value())
1185
1409
  {
1186
1410
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1187
1411
  return nullptr;
@@ -1206,7 +1430,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1206
1430
 
1207
1431
  try
1208
1432
  {
1209
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Gain"))
1433
+ static std::optional<bool> is_property_present{};
1434
+
1435
+ if (!is_property_present.has_value())
1436
+ {
1437
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Gain");
1438
+ }
1439
+
1440
+ if (!is_property_present.value())
1210
1441
  {
1211
1442
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1212
1443
  return -1;
@@ -1228,7 +1459,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1228
1459
  {
1229
1460
  try
1230
1461
  {
1231
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"State"))
1462
+ static std::optional<bool> is_property_present{};
1463
+
1464
+ if (!is_property_present.has_value())
1465
+ {
1466
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"State");
1467
+ }
1468
+
1469
+ if (!is_property_present.value())
1232
1470
  {
1233
1471
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1234
1472
  return nullptr;
@@ -1247,7 +1485,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1247
1485
  {
1248
1486
  try
1249
1487
  {
1250
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Kind"))
1488
+ static std::optional<bool> is_property_present{};
1489
+
1490
+ if (!is_property_present.has_value())
1491
+ {
1492
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.PeriodicForceEffect", L"Kind");
1493
+ }
1494
+
1495
+ if (!is_property_present.value())
1251
1496
  {
1252
1497
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1253
1498
  return nullptr;
@@ -1333,7 +1578,7 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1333
1578
  {
1334
1579
  try
1335
1580
  {
1336
- winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect instance{ };
1581
+ winrt::Windows::Gaming::Input::ForceFeedback::RampForceEffect instance{};
1337
1582
  return py::wrap(instance, type);
1338
1583
  }
1339
1584
  catch (...)
@@ -1365,7 +1610,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1365
1610
  {
1366
1611
  try
1367
1612
  {
1368
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"SetParameters", 3))
1613
+ static std::optional<bool> is_overload_present{};
1614
+
1615
+ if (!is_overload_present.has_value())
1616
+ {
1617
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"SetParameters", 3);
1618
+ }
1619
+
1620
+ if (!is_overload_present.value())
1369
1621
  {
1370
1622
  py::set_arg_count_version_error(3);
1371
1623
  return nullptr;
@@ -1399,7 +1651,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1399
1651
  {
1400
1652
  try
1401
1653
  {
1402
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"SetParametersWithEnvelope", 10))
1654
+ static std::optional<bool> is_overload_present{};
1655
+
1656
+ if (!is_overload_present.has_value())
1657
+ {
1658
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"SetParametersWithEnvelope", 10);
1659
+ }
1660
+
1661
+ if (!is_overload_present.value())
1403
1662
  {
1404
1663
  py::set_arg_count_version_error(10);
1405
1664
  return nullptr;
@@ -1440,7 +1699,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1440
1699
  {
1441
1700
  try
1442
1701
  {
1443
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Start", 0))
1702
+ static std::optional<bool> is_overload_present{};
1703
+
1704
+ if (!is_overload_present.has_value())
1705
+ {
1706
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Start", 0);
1707
+ }
1708
+
1709
+ if (!is_overload_present.value())
1444
1710
  {
1445
1711
  py::set_arg_count_version_error(0);
1446
1712
  return nullptr;
@@ -1470,7 +1736,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1470
1736
  {
1471
1737
  try
1472
1738
  {
1473
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Stop", 0))
1739
+ static std::optional<bool> is_overload_present{};
1740
+
1741
+ if (!is_overload_present.has_value())
1742
+ {
1743
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Stop", 0);
1744
+ }
1745
+
1746
+ if (!is_overload_present.value())
1474
1747
  {
1475
1748
  py::set_arg_count_version_error(0);
1476
1749
  return nullptr;
@@ -1496,7 +1769,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1496
1769
  {
1497
1770
  try
1498
1771
  {
1499
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Gain"))
1772
+ static std::optional<bool> is_property_present{};
1773
+
1774
+ if (!is_property_present.has_value())
1775
+ {
1776
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Gain");
1777
+ }
1778
+
1779
+ if (!is_property_present.value())
1500
1780
  {
1501
1781
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1502
1782
  return nullptr;
@@ -1521,7 +1801,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1521
1801
 
1522
1802
  try
1523
1803
  {
1524
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Gain"))
1804
+ static std::optional<bool> is_property_present{};
1805
+
1806
+ if (!is_property_present.has_value())
1807
+ {
1808
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"Gain");
1809
+ }
1810
+
1811
+ if (!is_property_present.value())
1525
1812
  {
1526
1813
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1527
1814
  return -1;
@@ -1543,7 +1830,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1543
1830
  {
1544
1831
  try
1545
1832
  {
1546
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"State"))
1833
+ static std::optional<bool> is_property_present{};
1834
+
1835
+ if (!is_property_present.has_value())
1836
+ {
1837
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.RampForceEffect", L"State");
1838
+ }
1839
+
1840
+ if (!is_property_present.value())
1547
1841
  {
1548
1842
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1549
1843
  return nullptr;
@@ -1638,7 +1932,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1638
1932
  {
1639
1933
  try
1640
1934
  {
1641
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Start", 0))
1935
+ static std::optional<bool> is_overload_present{};
1936
+
1937
+ if (!is_overload_present.has_value())
1938
+ {
1939
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Start", 0);
1940
+ }
1941
+
1942
+ if (!is_overload_present.value())
1642
1943
  {
1643
1944
  py::set_arg_count_version_error(0);
1644
1945
  return nullptr;
@@ -1668,7 +1969,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1668
1969
  {
1669
1970
  try
1670
1971
  {
1671
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Stop", 0))
1972
+ static std::optional<bool> is_overload_present{};
1973
+
1974
+ if (!is_overload_present.has_value())
1975
+ {
1976
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Stop", 0);
1977
+ }
1978
+
1979
+ if (!is_overload_present.value())
1672
1980
  {
1673
1981
  py::set_arg_count_version_error(0);
1674
1982
  return nullptr;
@@ -1694,7 +2002,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1694
2002
  {
1695
2003
  try
1696
2004
  {
1697
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Gain"))
2005
+ static std::optional<bool> is_property_present{};
2006
+
2007
+ if (!is_property_present.has_value())
2008
+ {
2009
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Gain");
2010
+ }
2011
+
2012
+ if (!is_property_present.value())
1698
2013
  {
1699
2014
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1700
2015
  return nullptr;
@@ -1719,7 +2034,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1719
2034
 
1720
2035
  try
1721
2036
  {
1722
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Gain"))
2037
+ static std::optional<bool> is_property_present{};
2038
+
2039
+ if (!is_property_present.has_value())
2040
+ {
2041
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"Gain");
2042
+ }
2043
+
2044
+ if (!is_property_present.value())
1723
2045
  {
1724
2046
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1725
2047
  return -1;
@@ -1741,7 +2063,14 @@ namespace py::cpp::Windows::Gaming::Input::ForceFeedback
1741
2063
  {
1742
2064
  try
1743
2065
  {
1744
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"State"))
2066
+ static std::optional<bool> is_property_present{};
2067
+
2068
+ if (!is_property_present.has_value())
2069
+ {
2070
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Gaming.Input.ForceFeedback.IForceFeedbackEffect", L"State");
2071
+ }
2072
+
2073
+ if (!is_property_present.value())
1745
2074
  {
1746
2075
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1747
2076
  return nullptr;
@@ -1854,32 +2183,38 @@ PyMODINIT_FUNC PyInit__winrt_windows_gaming_input_forcefeedback(void) noexcept
1854
2183
  return nullptr;
1855
2184
  }
1856
2185
 
1857
- if (py::register_python_type(module.get(), &type_spec_ConditionForceEffect, object_bases.get(), nullptr) == -1)
2186
+ py::pytype_handle ConditionForceEffect_type{py::register_python_type(module.get(), &type_spec_ConditionForceEffect, object_bases.get(), nullptr)};
2187
+ if (!ConditionForceEffect_type)
1858
2188
  {
1859
2189
  return nullptr;
1860
2190
  }
1861
2191
 
1862
- if (py::register_python_type(module.get(), &type_spec_ConstantForceEffect, object_bases.get(), nullptr) == -1)
2192
+ py::pytype_handle ConstantForceEffect_type{py::register_python_type(module.get(), &type_spec_ConstantForceEffect, object_bases.get(), nullptr)};
2193
+ if (!ConstantForceEffect_type)
1863
2194
  {
1864
2195
  return nullptr;
1865
2196
  }
1866
2197
 
1867
- if (py::register_python_type(module.get(), &type_spec_ForceFeedbackMotor, object_bases.get(), nullptr) == -1)
2198
+ py::pytype_handle ForceFeedbackMotor_type{py::register_python_type(module.get(), &type_spec_ForceFeedbackMotor, object_bases.get(), nullptr)};
2199
+ if (!ForceFeedbackMotor_type)
1868
2200
  {
1869
2201
  return nullptr;
1870
2202
  }
1871
2203
 
1872
- if (py::register_python_type(module.get(), &type_spec_PeriodicForceEffect, object_bases.get(), nullptr) == -1)
2204
+ py::pytype_handle PeriodicForceEffect_type{py::register_python_type(module.get(), &type_spec_PeriodicForceEffect, object_bases.get(), nullptr)};
2205
+ if (!PeriodicForceEffect_type)
1873
2206
  {
1874
2207
  return nullptr;
1875
2208
  }
1876
2209
 
1877
- if (py::register_python_type(module.get(), &type_spec_RampForceEffect, object_bases.get(), nullptr) == -1)
2210
+ py::pytype_handle RampForceEffect_type{py::register_python_type(module.get(), &type_spec_RampForceEffect, object_bases.get(), nullptr)};
2211
+ if (!RampForceEffect_type)
1878
2212
  {
1879
2213
  return nullptr;
1880
2214
  }
1881
2215
 
1882
- if (py::register_python_type(module.get(), &type_spec_IForceFeedbackEffect, object_bases.get(), nullptr) == -1)
2216
+ py::pytype_handle IForceFeedbackEffect_type{py::register_python_type(module.get(), &type_spec_IForceFeedbackEffect, object_bases.get(), nullptr)};
2217
+ if (!IForceFeedbackEffect_type)
1883
2218
  {
1884
2219
  return nullptr;
1885
2220
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies", "optional-dependencies"]
19
- requires-python = ">=3.9,<3.13"
19
+ requires-python = ">=3.9,<3.14"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
36
36
  # use local winrt-sdk build dependency
37
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
+ before-build = "uv pip install setuptools"
40
41
  # don't build for PyPy
41
42
  skip = "pp*"
42
43
  # suppress warnings about ARM64 testing
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
- winrt-runtime==2.1.0
3
+ winrt-runtime==2.3.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Gaming.Input.ForceFeedback
3
- Version: 2.1.0
3
+ Version: 2.3.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,12 +10,12 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.1.0
15
+ Requires-Dist: winrt-runtime==2.3.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation.Numerics[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.3.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation.Numerics[all]==2.3.0; extra == "all"
19
19
 
20
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
21
21
 
@@ -0,0 +1,5 @@
1
+ winrt-runtime==2.3.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.3.0
5
+ winrt-Windows.Foundation.Numerics[all]==2.3.0
@@ -1,4 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
-
3
- winrt-Windows.Foundation[all]==2.1.0
4
- winrt-Windows.Foundation.Numerics[all]==2.1.0
@@ -1,5 +0,0 @@
1
- winrt-runtime==2.1.0
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.1.0
5
- winrt-Windows.Foundation.Numerics[all]==2.1.0