winrt-Windows.System.Preview 2.0.1__tar.gz → 2.2.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_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/PKG-INFO +5 -5
  2. winrt_windows_system_preview-2.2.0/all-requirements.txt +4 -0
  3. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/py.Windows.System.Preview.cpp +173 -104
  4. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_system_preview-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt/_winrt_windows_system_preview.pyi +9 -9
  8. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt/windows/system/preview/__init__.py +1 -1
  9. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt_Windows.System.Preview.egg-info/PKG-INFO +5 -5
  10. winrt_windows_system_preview-2.2.0/winrt_Windows.System.Preview.egg-info/requires.txt +5 -0
  11. winrt_windows_system_preview-2.0.1/all-requirements.txt +0 -4
  12. winrt_windows_system_preview-2.0.1/pywinrt-version.txt +0 -1
  13. winrt_windows_system_preview-2.0.1/winrt_Windows.System.Preview.egg-info/requires.txt +0 -5
  14. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/README.md +0 -0
  15. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/setup.cfg +0 -0
  16. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/setup.py +0 -0
  17. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt/windows/system/preview/py.typed +0 -0
  18. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt_Windows.System.Preview.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt_Windows.System.Preview.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_system_preview-2.0.1 → winrt_windows_system_preview-2.2.0}/winrt_Windows.System.Preview.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Preview
3
- Version: 2.0.1
3
+ Version: 2.2.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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Devices.Sensors[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Devices.Sensors[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.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.2.0
2
+
3
+ winrt-Windows.Devices.Sensors[all]==2.2.0
4
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.System.Preview.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Preview
7
6
  {
8
7
  // ----- TwoPanelHingedDevicePosturePreview class --------------------
@@ -28,14 +27,21 @@ namespace py::cpp::Windows::System::Preview
28
27
 
29
28
  if (arg_count == 0)
30
29
  {
31
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"GetCurrentPostureAsync", 0))
32
- {
33
- py::set_arg_count_version_error(0);
34
- return nullptr;
35
- }
36
-
37
30
  try
38
31
  {
32
+ static std::optional<bool> is_overload_present{};
33
+
34
+ if (!is_overload_present.has_value())
35
+ {
36
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"GetCurrentPostureAsync", 0);
37
+ }
38
+
39
+ if (!is_overload_present.value())
40
+ {
41
+ py::set_arg_count_version_error(0);
42
+ return nullptr;
43
+ }
44
+
39
45
  return py::convert(self->obj.GetCurrentPostureAsync());
40
46
  }
41
47
  catch (...)
@@ -57,14 +63,21 @@ namespace py::cpp::Windows::System::Preview
57
63
 
58
64
  if (arg_count == 0)
59
65
  {
60
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"GetDefaultAsync", 0))
61
- {
62
- py::set_arg_count_version_error(0);
63
- return nullptr;
64
- }
65
-
66
66
  try
67
67
  {
68
+ static std::optional<bool> is_overload_present{};
69
+
70
+ if (!is_overload_present.has_value())
71
+ {
72
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"GetDefaultAsync", 0);
73
+ }
74
+
75
+ if (!is_overload_present.value())
76
+ {
77
+ py::set_arg_count_version_error(0);
78
+ return nullptr;
79
+ }
80
+
68
81
  return py::convert(winrt::Windows::System::Preview::TwoPanelHingedDevicePosturePreview::GetDefaultAsync());
69
82
  }
70
83
  catch (...)
@@ -82,14 +95,21 @@ namespace py::cpp::Windows::System::Preview
82
95
 
83
96
  static PyObject* TwoPanelHingedDevicePosturePreview_add_PostureChanged(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreview* self, PyObject* arg) noexcept
84
97
  {
85
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"PostureChanged"))
86
- {
87
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
88
- return nullptr;
89
- }
90
-
91
98
  try
92
99
  {
100
+ static std::optional<bool> is_event_present{};
101
+
102
+ if (!is_event_present.has_value())
103
+ {
104
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"PostureChanged");
105
+ }
106
+
107
+ if (!is_event_present.value())
108
+ {
109
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
110
+ return nullptr;
111
+ }
112
+
93
113
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::System::Preview::TwoPanelHingedDevicePosturePreview, winrt::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs>>(arg);
94
114
 
95
115
  return py::convert(self->obj.PostureChanged(param0));
@@ -103,14 +123,21 @@ namespace py::cpp::Windows::System::Preview
103
123
 
104
124
  static PyObject* TwoPanelHingedDevicePosturePreview_remove_PostureChanged(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreview* self, PyObject* arg) noexcept
105
125
  {
106
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"PostureChanged"))
107
- {
108
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
109
- return nullptr;
110
- }
111
-
112
126
  try
113
127
  {
128
+ static std::optional<bool> is_event_present{};
129
+
130
+ if (!is_event_present.has_value())
131
+ {
132
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreview", L"PostureChanged");
133
+ }
134
+
135
+ if (!is_event_present.value())
136
+ {
137
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
138
+ return nullptr;
139
+ }
140
+
114
141
  auto param0 = py::convert_to<winrt::event_token>(arg);
115
142
 
116
143
  self->obj.PostureChanged(param0);
@@ -160,23 +187,20 @@ namespace py::cpp::Windows::System::Preview
160
187
  { }
161
188
  };
162
189
 
163
- static PyType_Slot _type_slots_TwoPanelHingedDevicePosturePreview[] =
164
- {
190
+ static PyType_Slot _type_slots_TwoPanelHingedDevicePosturePreview[] = {
165
191
  { Py_tp_new, reinterpret_cast<void*>(_new_TwoPanelHingedDevicePosturePreview) },
166
192
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TwoPanelHingedDevicePosturePreview) },
167
193
  { Py_tp_methods, reinterpret_cast<void*>(_methods_TwoPanelHingedDevicePosturePreview) },
168
194
  { Py_tp_getset, reinterpret_cast<void*>(_getset_TwoPanelHingedDevicePosturePreview) },
169
- { },
195
+ { }
170
196
  };
171
197
 
172
- static PyType_Spec type_spec_TwoPanelHingedDevicePosturePreview =
173
- {
198
+ static PyType_Spec type_spec_TwoPanelHingedDevicePosturePreview = {
174
199
  "winrt._winrt_windows_system_preview.TwoPanelHingedDevicePosturePreview",
175
200
  sizeof(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreview),
176
201
  0,
177
202
  Py_TPFLAGS_DEFAULT,
178
- _type_slots_TwoPanelHingedDevicePosturePreview
179
- };
203
+ _type_slots_TwoPanelHingedDevicePosturePreview};
180
204
 
181
205
  static PyGetSetDef getset_TwoPanelHingedDevicePosturePreview_Static[] = {
182
206
  { }
@@ -223,14 +247,21 @@ namespace py::cpp::Windows::System::Preview
223
247
 
224
248
  static PyObject* TwoPanelHingedDevicePosturePreviewReading_get_HingeState(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading* self, void* /*unused*/) noexcept
225
249
  {
226
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"HingeState"))
227
- {
228
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
229
- return nullptr;
230
- }
231
-
232
250
  try
233
251
  {
252
+ static std::optional<bool> is_property_present{};
253
+
254
+ if (!is_property_present.has_value())
255
+ {
256
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"HingeState");
257
+ }
258
+
259
+ if (!is_property_present.value())
260
+ {
261
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
262
+ return nullptr;
263
+ }
264
+
234
265
  return py::convert(self->obj.HingeState());
235
266
  }
236
267
  catch (...)
@@ -242,14 +273,21 @@ namespace py::cpp::Windows::System::Preview
242
273
 
243
274
  static PyObject* TwoPanelHingedDevicePosturePreviewReading_get_Panel1Id(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading* self, void* /*unused*/) noexcept
244
275
  {
245
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel1Id"))
246
- {
247
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
248
- return nullptr;
249
- }
250
-
251
276
  try
252
277
  {
278
+ static std::optional<bool> is_property_present{};
279
+
280
+ if (!is_property_present.has_value())
281
+ {
282
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel1Id");
283
+ }
284
+
285
+ if (!is_property_present.value())
286
+ {
287
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
288
+ return nullptr;
289
+ }
290
+
253
291
  return py::convert(self->obj.Panel1Id());
254
292
  }
255
293
  catch (...)
@@ -261,14 +299,21 @@ namespace py::cpp::Windows::System::Preview
261
299
 
262
300
  static PyObject* TwoPanelHingedDevicePosturePreviewReading_get_Panel1Orientation(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading* self, void* /*unused*/) noexcept
263
301
  {
264
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel1Orientation"))
265
- {
266
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
267
- return nullptr;
268
- }
269
-
270
302
  try
271
303
  {
304
+ static std::optional<bool> is_property_present{};
305
+
306
+ if (!is_property_present.has_value())
307
+ {
308
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel1Orientation");
309
+ }
310
+
311
+ if (!is_property_present.value())
312
+ {
313
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
314
+ return nullptr;
315
+ }
316
+
272
317
  return py::convert(self->obj.Panel1Orientation());
273
318
  }
274
319
  catch (...)
@@ -280,14 +325,21 @@ namespace py::cpp::Windows::System::Preview
280
325
 
281
326
  static PyObject* TwoPanelHingedDevicePosturePreviewReading_get_Panel2Id(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading* self, void* /*unused*/) noexcept
282
327
  {
283
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel2Id"))
284
- {
285
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
286
- return nullptr;
287
- }
288
-
289
328
  try
290
329
  {
330
+ static std::optional<bool> is_property_present{};
331
+
332
+ if (!is_property_present.has_value())
333
+ {
334
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel2Id");
335
+ }
336
+
337
+ if (!is_property_present.value())
338
+ {
339
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
340
+ return nullptr;
341
+ }
342
+
291
343
  return py::convert(self->obj.Panel2Id());
292
344
  }
293
345
  catch (...)
@@ -299,14 +351,21 @@ namespace py::cpp::Windows::System::Preview
299
351
 
300
352
  static PyObject* TwoPanelHingedDevicePosturePreviewReading_get_Panel2Orientation(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading* self, void* /*unused*/) noexcept
301
353
  {
302
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel2Orientation"))
303
- {
304
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
305
- return nullptr;
306
- }
307
-
308
354
  try
309
355
  {
356
+ static std::optional<bool> is_property_present{};
357
+
358
+ if (!is_property_present.has_value())
359
+ {
360
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Panel2Orientation");
361
+ }
362
+
363
+ if (!is_property_present.value())
364
+ {
365
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
366
+ return nullptr;
367
+ }
368
+
310
369
  return py::convert(self->obj.Panel2Orientation());
311
370
  }
312
371
  catch (...)
@@ -318,14 +377,21 @@ namespace py::cpp::Windows::System::Preview
318
377
 
319
378
  static PyObject* TwoPanelHingedDevicePosturePreviewReading_get_Timestamp(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading* self, void* /*unused*/) noexcept
320
379
  {
321
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Timestamp"))
322
- {
323
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
324
- return nullptr;
325
- }
326
-
327
380
  try
328
381
  {
382
+ static std::optional<bool> is_property_present{};
383
+
384
+ if (!is_property_present.has_value())
385
+ {
386
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReading", L"Timestamp");
387
+ }
388
+
389
+ if (!is_property_present.value())
390
+ {
391
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
392
+ return nullptr;
393
+ }
394
+
329
395
  return py::convert(self->obj.Timestamp());
330
396
  }
331
397
  catch (...)
@@ -375,23 +441,20 @@ namespace py::cpp::Windows::System::Preview
375
441
  { }
376
442
  };
377
443
 
378
- static PyType_Slot _type_slots_TwoPanelHingedDevicePosturePreviewReading[] =
379
- {
444
+ static PyType_Slot _type_slots_TwoPanelHingedDevicePosturePreviewReading[] = {
380
445
  { Py_tp_new, reinterpret_cast<void*>(_new_TwoPanelHingedDevicePosturePreviewReading) },
381
446
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TwoPanelHingedDevicePosturePreviewReading) },
382
447
  { Py_tp_methods, reinterpret_cast<void*>(_methods_TwoPanelHingedDevicePosturePreviewReading) },
383
448
  { Py_tp_getset, reinterpret_cast<void*>(_getset_TwoPanelHingedDevicePosturePreviewReading) },
384
- { },
449
+ { }
385
450
  };
386
451
 
387
- static PyType_Spec type_spec_TwoPanelHingedDevicePosturePreviewReading =
388
- {
452
+ static PyType_Spec type_spec_TwoPanelHingedDevicePosturePreviewReading = {
389
453
  "winrt._winrt_windows_system_preview.TwoPanelHingedDevicePosturePreviewReading",
390
454
  sizeof(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReading),
391
455
  0,
392
456
  Py_TPFLAGS_DEFAULT,
393
- _type_slots_TwoPanelHingedDevicePosturePreviewReading
394
- };
457
+ _type_slots_TwoPanelHingedDevicePosturePreviewReading};
395
458
 
396
459
  // ----- TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs class --------------------
397
460
 
@@ -412,14 +475,21 @@ namespace py::cpp::Windows::System::Preview
412
475
 
413
476
  static PyObject* TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs_get_Reading(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs* self, void* /*unused*/) noexcept
414
477
  {
415
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs", L"Reading"))
416
- {
417
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
418
- return nullptr;
419
- }
420
-
421
478
  try
422
479
  {
480
+ static std::optional<bool> is_property_present{};
481
+
482
+ if (!is_property_present.has_value())
483
+ {
484
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Preview.TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs", L"Reading");
485
+ }
486
+
487
+ if (!is_property_present.value())
488
+ {
489
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
490
+ return nullptr;
491
+ }
492
+
423
493
  return py::convert(self->obj.Reading());
424
494
  }
425
495
  catch (...)
@@ -464,39 +534,35 @@ namespace py::cpp::Windows::System::Preview
464
534
  { }
465
535
  };
466
536
 
467
- static PyType_Slot _type_slots_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs[] =
468
- {
537
+ static PyType_Slot _type_slots_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs[] = {
469
538
  { Py_tp_new, reinterpret_cast<void*>(_new_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs) },
470
539
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs) },
471
540
  { Py_tp_methods, reinterpret_cast<void*>(_methods_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs) },
472
541
  { Py_tp_getset, reinterpret_cast<void*>(_getset_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs) },
473
- { },
542
+ { }
474
543
  };
475
544
 
476
- static PyType_Spec type_spec_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs =
477
- {
545
+ static PyType_Spec type_spec_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs = {
478
546
  "winrt._winrt_windows_system_preview.TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs",
479
547
  sizeof(py::wrapper::Windows::System::Preview::TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs),
480
548
  0,
481
549
  Py_TPFLAGS_DEFAULT,
482
- _type_slots_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs
483
- };
550
+ _type_slots_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs};
484
551
 
485
552
  // ----- Windows.System.Preview Initialization --------------------
486
- PyDoc_STRVAR(module_doc, "Windows::System::Preview");
487
553
 
554
+ PyDoc_STRVAR(module_doc, "Windows.System.Preview");
488
555
 
489
- static PyModuleDef module_def
490
- = {PyModuleDef_HEAD_INIT,
491
- "_winrt_windows_system_preview",
492
- module_doc,
493
- 0,
494
- nullptr,
495
- nullptr,
496
- nullptr,
497
- nullptr,
498
- nullptr};
499
-
556
+ static PyModuleDef module_def = {
557
+ PyModuleDef_HEAD_INIT,
558
+ "_winrt_windows_system_preview",
559
+ module_doc,
560
+ 0,
561
+ nullptr,
562
+ nullptr,
563
+ nullptr,
564
+ nullptr,
565
+ nullptr};
500
566
  } // py::cpp::Windows::System::Preview
501
567
 
502
568
  PyMODINIT_FUNC PyInit__winrt_windows_system_preview(void) noexcept
@@ -534,17 +600,20 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_preview(void) noexcept
534
600
  return nullptr;
535
601
  }
536
602
 
537
- if (py::register_python_type(module.get(), &type_spec_TwoPanelHingedDevicePosturePreview, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_TwoPanelHingedDevicePosturePreview_Static.get())) == -1)
603
+ py::pytype_handle TwoPanelHingedDevicePosturePreview_type{py::register_python_type(module.get(), &type_spec_TwoPanelHingedDevicePosturePreview, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_TwoPanelHingedDevicePosturePreview_Static.get()))};
604
+ if (!TwoPanelHingedDevicePosturePreview_type)
538
605
  {
539
606
  return nullptr;
540
607
  }
541
608
 
542
- if (py::register_python_type(module.get(), &type_spec_TwoPanelHingedDevicePosturePreviewReading, object_bases.get(), nullptr) == -1)
609
+ py::pytype_handle TwoPanelHingedDevicePosturePreviewReading_type{py::register_python_type(module.get(), &type_spec_TwoPanelHingedDevicePosturePreviewReading, object_bases.get(), nullptr)};
610
+ if (!TwoPanelHingedDevicePosturePreviewReading_type)
543
611
  {
544
612
  return nullptr;
545
613
  }
546
614
 
547
- if (py::register_python_type(module.get(), &type_spec_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs, object_bases.get(), nullptr) == -1)
615
+ py::pytype_handle TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs_type{py::register_python_type(module.get(), &type_spec_TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs, object_bases.get(), nullptr)};
616
+ if (!TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs_type)
548
617
  {
549
618
  return nullptr;
550
619
  }
@@ -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.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.2.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -9,8 +9,8 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.devices.sensors
13
- import winrt.windows.foundation
12
+ import winrt.windows.devices.sensors as windows_devices_sensors
13
+ import winrt.windows.foundation as windows_foundation
14
14
 
15
15
  from winrt.windows.system.preview import HingeState
16
16
 
@@ -18,15 +18,15 @@ Self = typing.TypeVar('Self')
18
18
 
19
19
  @typing.final
20
20
  class TwoPanelHingedDevicePosturePreview_Static(type):
21
- def get_default_async(cls) -> winrt.windows.foundation.IAsyncOperation[TwoPanelHingedDevicePosturePreview]: ...
21
+ def get_default_async(cls) -> windows_foundation.IAsyncOperation[TwoPanelHingedDevicePosturePreview]: ...
22
22
 
23
23
  @typing.final
24
24
  class TwoPanelHingedDevicePosturePreview(winrt.system.Object, metaclass=TwoPanelHingedDevicePosturePreview_Static):
25
25
  @staticmethod
26
26
  def _from(obj: winrt.system.Object, /) -> TwoPanelHingedDevicePosturePreview: ...
27
- def get_current_posture_async(self) -> winrt.windows.foundation.IAsyncOperation[TwoPanelHingedDevicePosturePreviewReading]: ...
28
- def add_posture_changed(self, handler: winrt.windows.foundation.TypedEventHandler[TwoPanelHingedDevicePosturePreview, TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
29
- def remove_posture_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
27
+ def get_current_posture_async(self) -> windows_foundation.IAsyncOperation[TwoPanelHingedDevicePosturePreviewReading]: ...
28
+ def add_posture_changed(self, handler: windows_foundation.TypedEventHandler[TwoPanelHingedDevicePosturePreview, TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
29
+ def remove_posture_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
30
30
 
31
31
  @typing.final
32
32
  class TwoPanelHingedDevicePosturePreviewReading(winrt.system.Object):
@@ -37,11 +37,11 @@ class TwoPanelHingedDevicePosturePreviewReading(winrt.system.Object):
37
37
  @_property
38
38
  def panel1_id(self) -> str: ...
39
39
  @_property
40
- def panel1_orientation(self) -> winrt.windows.devices.sensors.SimpleOrientation: ...
40
+ def panel1_orientation(self) -> windows_devices_sensors.SimpleOrientation: ...
41
41
  @_property
42
42
  def panel2_id(self) -> str: ...
43
43
  @_property
44
- def panel2_orientation(self) -> winrt.windows.devices.sensors.SimpleOrientation: ...
44
+ def panel2_orientation(self) -> windows_devices_sensors.SimpleOrientation: ...
45
45
  @_property
46
46
  def timestamp(self) -> datetime.datetime: ...
47
47
 
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Preview
3
- Version: 2.0.1
3
+ Version: 2.2.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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Devices.Sensors[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Devices.Sensors[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.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.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Devices.Sensors[all]==2.2.0
5
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,4 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.Devices.Sensors[all]==2.0.1
4
- winrt-Windows.Foundation[all]==2.0.1
@@ -1 +0,0 @@
1
- 2.0.1
@@ -1,5 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Devices.Sensors[all]==2.0.1
5
- winrt-Windows.Foundation[all]==2.0.1