winrt-Windows.Devices.Display 2.0.0b2__tar.gz → 2.1.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 (21) hide show
  1. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/PKG-INFO +4 -1
  2. winrt_windows_devices_display-2.1.0/all-requirements.txt +4 -0
  3. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/py.Windows.Devices.Display.cpp +160 -165
  4. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/pyproject.toml +2 -2
  5. winrt_windows_devices_display-2.1.0/pywinrt-version.txt +1 -0
  6. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/requirements.txt +2 -2
  7. winrt_windows_devices_display-2.1.0/setup.py +31 -0
  8. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/winrt/_winrt_windows_devices_display.pyi +13 -13
  9. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/winrt/windows/devices/display/__init__.py +1 -1
  10. winrt_windows_devices_display-2.1.0/winrt/windows/devices/display/py.typed +0 -0
  11. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/winrt_Windows.Devices.Display.egg-info/PKG-INFO +4 -1
  12. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/winrt_Windows.Devices.Display.egg-info/SOURCES.txt +1 -0
  13. winrt_windows_devices_display-2.1.0/winrt_Windows.Devices.Display.egg-info/requires.txt +5 -0
  14. winrt-Windows.Devices.Display-2.0.0b2/all-requirements.txt +0 -4
  15. winrt-Windows.Devices.Display-2.0.0b2/pywinrt-version.txt +0 -1
  16. winrt-Windows.Devices.Display-2.0.0b2/setup.py +0 -16
  17. winrt-Windows.Devices.Display-2.0.0b2/winrt_Windows.Devices.Display.egg-info/requires.txt +0 -5
  18. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/README.md +0 -0
  19. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/setup.cfg +0 -0
  20. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/winrt_Windows.Devices.Display.egg-info/dependency_links.txt +0 -0
  21. {winrt-Windows.Devices.Display-2.0.0b2 → winrt_windows_devices_display-2.1.0}/winrt_Windows.Devices.Display.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Devices.Display
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,10 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Graphics[all]==2.1.0; extra == "all"
16
19
 
17
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
21
 
@@ -0,0 +1,4 @@
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.Graphics[all]==2.1.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  #include "py.Windows.Devices.Display.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::Devices::Display
7
6
  {
8
7
  // ----- DisplayMonitor class --------------------
@@ -28,14 +27,14 @@ namespace py::cpp::Windows::Devices::Display
28
27
 
29
28
  if (arg_count == 1)
30
29
  {
31
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"FromIdAsync", 1))
32
- {
33
- py::set_arg_count_version_error(1);
34
- return nullptr;
35
- }
36
-
37
30
  try
38
31
  {
32
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"FromIdAsync", 1))
33
+ {
34
+ py::set_arg_count_version_error(1);
35
+ return nullptr;
36
+ }
37
+
39
38
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
40
39
 
41
40
  return py::convert(winrt::Windows::Devices::Display::DisplayMonitor::FromIdAsync(param0));
@@ -59,14 +58,14 @@ namespace py::cpp::Windows::Devices::Display
59
58
 
60
59
  if (arg_count == 1)
61
60
  {
62
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"FromInterfaceIdAsync", 1))
63
- {
64
- py::set_arg_count_version_error(1);
65
- return nullptr;
66
- }
67
-
68
61
  try
69
62
  {
63
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"FromInterfaceIdAsync", 1))
64
+ {
65
+ py::set_arg_count_version_error(1);
66
+ return nullptr;
67
+ }
68
+
70
69
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
71
70
 
72
71
  return py::convert(winrt::Windows::Devices::Display::DisplayMonitor::FromInterfaceIdAsync(param0));
@@ -90,14 +89,14 @@ namespace py::cpp::Windows::Devices::Display
90
89
 
91
90
  if (arg_count == 1)
92
91
  {
93
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"GetDescriptor", 1))
94
- {
95
- py::set_arg_count_version_error(1);
96
- return nullptr;
97
- }
98
-
99
92
  try
100
93
  {
94
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"GetDescriptor", 1))
95
+ {
96
+ py::set_arg_count_version_error(1);
97
+ return nullptr;
98
+ }
99
+
101
100
  auto param0 = py::convert_to<winrt::Windows::Devices::Display::DisplayMonitorDescriptorKind>(args, 0);
102
101
 
103
102
  return py::convert(self->obj.GetDescriptor(param0));
@@ -121,14 +120,14 @@ namespace py::cpp::Windows::Devices::Display
121
120
 
122
121
  if (arg_count == 0)
123
122
  {
124
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"GetDeviceSelector", 0))
125
- {
126
- py::set_arg_count_version_error(0);
127
- return nullptr;
128
- }
129
-
130
123
  try
131
124
  {
125
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Display.DisplayMonitor", L"GetDeviceSelector", 0))
126
+ {
127
+ py::set_arg_count_version_error(0);
128
+ return nullptr;
129
+ }
130
+
132
131
  return py::convert(winrt::Windows::Devices::Display::DisplayMonitor::GetDeviceSelector());
133
132
  }
134
133
  catch (...)
@@ -146,14 +145,14 @@ namespace py::cpp::Windows::Devices::Display
146
145
 
147
146
  static PyObject* DisplayMonitor_get_BluePrimary(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
148
147
  {
149
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"BluePrimary"))
150
- {
151
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
152
- return nullptr;
153
- }
154
-
155
148
  try
156
149
  {
150
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"BluePrimary"))
151
+ {
152
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
153
+ return nullptr;
154
+ }
155
+
157
156
  return py::convert(self->obj.BluePrimary());
158
157
  }
159
158
  catch (...)
@@ -165,14 +164,14 @@ namespace py::cpp::Windows::Devices::Display
165
164
 
166
165
  static PyObject* DisplayMonitor_get_ConnectionKind(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
167
166
  {
168
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"ConnectionKind"))
169
- {
170
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
171
- return nullptr;
172
- }
173
-
174
167
  try
175
168
  {
169
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"ConnectionKind"))
170
+ {
171
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
172
+ return nullptr;
173
+ }
174
+
176
175
  return py::convert(self->obj.ConnectionKind());
177
176
  }
178
177
  catch (...)
@@ -184,14 +183,14 @@ namespace py::cpp::Windows::Devices::Display
184
183
 
185
184
  static PyObject* DisplayMonitor_get_DeviceId(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
186
185
  {
187
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DeviceId"))
188
- {
189
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
190
- return nullptr;
191
- }
192
-
193
186
  try
194
187
  {
188
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DeviceId"))
189
+ {
190
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
191
+ return nullptr;
192
+ }
193
+
195
194
  return py::convert(self->obj.DeviceId());
196
195
  }
197
196
  catch (...)
@@ -203,14 +202,14 @@ namespace py::cpp::Windows::Devices::Display
203
202
 
204
203
  static PyObject* DisplayMonitor_get_DisplayAdapterDeviceId(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
205
204
  {
206
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayAdapterDeviceId"))
207
- {
208
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
209
- return nullptr;
210
- }
211
-
212
205
  try
213
206
  {
207
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayAdapterDeviceId"))
208
+ {
209
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
210
+ return nullptr;
211
+ }
212
+
214
213
  return py::convert(self->obj.DisplayAdapterDeviceId());
215
214
  }
216
215
  catch (...)
@@ -222,14 +221,14 @@ namespace py::cpp::Windows::Devices::Display
222
221
 
223
222
  static PyObject* DisplayMonitor_get_DisplayAdapterId(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
224
223
  {
225
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayAdapterId"))
226
- {
227
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
228
- return nullptr;
229
- }
230
-
231
224
  try
232
225
  {
226
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayAdapterId"))
227
+ {
228
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
229
+ return nullptr;
230
+ }
231
+
233
232
  return py::convert(self->obj.DisplayAdapterId());
234
233
  }
235
234
  catch (...)
@@ -241,14 +240,14 @@ namespace py::cpp::Windows::Devices::Display
241
240
 
242
241
  static PyObject* DisplayMonitor_get_DisplayAdapterTargetId(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
243
242
  {
244
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayAdapterTargetId"))
245
- {
246
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
247
- return nullptr;
248
- }
249
-
250
243
  try
251
244
  {
245
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayAdapterTargetId"))
246
+ {
247
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
248
+ return nullptr;
249
+ }
250
+
252
251
  return py::convert(self->obj.DisplayAdapterTargetId());
253
252
  }
254
253
  catch (...)
@@ -260,14 +259,14 @@ namespace py::cpp::Windows::Devices::Display
260
259
 
261
260
  static PyObject* DisplayMonitor_get_DisplayName(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
262
261
  {
263
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayName"))
264
- {
265
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
266
- return nullptr;
267
- }
268
-
269
262
  try
270
263
  {
264
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"DisplayName"))
265
+ {
266
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
267
+ return nullptr;
268
+ }
269
+
271
270
  return py::convert(self->obj.DisplayName());
272
271
  }
273
272
  catch (...)
@@ -279,14 +278,14 @@ namespace py::cpp::Windows::Devices::Display
279
278
 
280
279
  static PyObject* DisplayMonitor_get_GreenPrimary(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
281
280
  {
282
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"GreenPrimary"))
283
- {
284
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
285
- return nullptr;
286
- }
287
-
288
281
  try
289
282
  {
283
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"GreenPrimary"))
284
+ {
285
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
286
+ return nullptr;
287
+ }
288
+
290
289
  return py::convert(self->obj.GreenPrimary());
291
290
  }
292
291
  catch (...)
@@ -298,14 +297,14 @@ namespace py::cpp::Windows::Devices::Display
298
297
 
299
298
  static PyObject* DisplayMonitor_get_MaxAverageFullFrameLuminanceInNits(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
300
299
  {
301
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"MaxAverageFullFrameLuminanceInNits"))
302
- {
303
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
304
- return nullptr;
305
- }
306
-
307
300
  try
308
301
  {
302
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"MaxAverageFullFrameLuminanceInNits"))
303
+ {
304
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
305
+ return nullptr;
306
+ }
307
+
309
308
  return py::convert(self->obj.MaxAverageFullFrameLuminanceInNits());
310
309
  }
311
310
  catch (...)
@@ -317,14 +316,14 @@ namespace py::cpp::Windows::Devices::Display
317
316
 
318
317
  static PyObject* DisplayMonitor_get_MaxLuminanceInNits(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
319
318
  {
320
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"MaxLuminanceInNits"))
321
- {
322
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
323
- return nullptr;
324
- }
325
-
326
319
  try
327
320
  {
321
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"MaxLuminanceInNits"))
322
+ {
323
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
324
+ return nullptr;
325
+ }
326
+
328
327
  return py::convert(self->obj.MaxLuminanceInNits());
329
328
  }
330
329
  catch (...)
@@ -336,14 +335,14 @@ namespace py::cpp::Windows::Devices::Display
336
335
 
337
336
  static PyObject* DisplayMonitor_get_MinLuminanceInNits(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
338
337
  {
339
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"MinLuminanceInNits"))
340
- {
341
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
342
- return nullptr;
343
- }
344
-
345
338
  try
346
339
  {
340
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"MinLuminanceInNits"))
341
+ {
342
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
343
+ return nullptr;
344
+ }
345
+
347
346
  return py::convert(self->obj.MinLuminanceInNits());
348
347
  }
349
348
  catch (...)
@@ -355,14 +354,14 @@ namespace py::cpp::Windows::Devices::Display
355
354
 
356
355
  static PyObject* DisplayMonitor_get_NativeResolutionInRawPixels(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
357
356
  {
358
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"NativeResolutionInRawPixels"))
359
- {
360
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
361
- return nullptr;
362
- }
363
-
364
357
  try
365
358
  {
359
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"NativeResolutionInRawPixels"))
360
+ {
361
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
362
+ return nullptr;
363
+ }
364
+
366
365
  return py::convert(self->obj.NativeResolutionInRawPixels());
367
366
  }
368
367
  catch (...)
@@ -374,14 +373,14 @@ namespace py::cpp::Windows::Devices::Display
374
373
 
375
374
  static PyObject* DisplayMonitor_get_PhysicalConnector(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
376
375
  {
377
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"PhysicalConnector"))
378
- {
379
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
380
- return nullptr;
381
- }
382
-
383
376
  try
384
377
  {
378
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"PhysicalConnector"))
379
+ {
380
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
381
+ return nullptr;
382
+ }
383
+
385
384
  return py::convert(self->obj.PhysicalConnector());
386
385
  }
387
386
  catch (...)
@@ -393,14 +392,14 @@ namespace py::cpp::Windows::Devices::Display
393
392
 
394
393
  static PyObject* DisplayMonitor_get_PhysicalSizeInInches(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
395
394
  {
396
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"PhysicalSizeInInches"))
397
- {
398
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
399
- return nullptr;
400
- }
401
-
402
395
  try
403
396
  {
397
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"PhysicalSizeInInches"))
398
+ {
399
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
400
+ return nullptr;
401
+ }
402
+
404
403
  return py::convert(self->obj.PhysicalSizeInInches());
405
404
  }
406
405
  catch (...)
@@ -412,14 +411,14 @@ namespace py::cpp::Windows::Devices::Display
412
411
 
413
412
  static PyObject* DisplayMonitor_get_RawDpiX(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
414
413
  {
415
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"RawDpiX"))
416
- {
417
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
418
- return nullptr;
419
- }
420
-
421
414
  try
422
415
  {
416
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"RawDpiX"))
417
+ {
418
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
419
+ return nullptr;
420
+ }
421
+
423
422
  return py::convert(self->obj.RawDpiX());
424
423
  }
425
424
  catch (...)
@@ -431,14 +430,14 @@ namespace py::cpp::Windows::Devices::Display
431
430
 
432
431
  static PyObject* DisplayMonitor_get_RawDpiY(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
433
432
  {
434
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"RawDpiY"))
435
- {
436
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
437
- return nullptr;
438
- }
439
-
440
433
  try
441
434
  {
435
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"RawDpiY"))
436
+ {
437
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
438
+ return nullptr;
439
+ }
440
+
442
441
  return py::convert(self->obj.RawDpiY());
443
442
  }
444
443
  catch (...)
@@ -450,14 +449,14 @@ namespace py::cpp::Windows::Devices::Display
450
449
 
451
450
  static PyObject* DisplayMonitor_get_RedPrimary(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
452
451
  {
453
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"RedPrimary"))
454
- {
455
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
456
- return nullptr;
457
- }
458
-
459
452
  try
460
453
  {
454
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"RedPrimary"))
455
+ {
456
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
457
+ return nullptr;
458
+ }
459
+
461
460
  return py::convert(self->obj.RedPrimary());
462
461
  }
463
462
  catch (...)
@@ -469,14 +468,14 @@ namespace py::cpp::Windows::Devices::Display
469
468
 
470
469
  static PyObject* DisplayMonitor_get_UsageKind(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
471
470
  {
472
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"UsageKind"))
473
- {
474
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
475
- return nullptr;
476
- }
477
-
478
471
  try
479
472
  {
473
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"UsageKind"))
474
+ {
475
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
476
+ return nullptr;
477
+ }
478
+
480
479
  return py::convert(self->obj.UsageKind());
481
480
  }
482
481
  catch (...)
@@ -488,14 +487,14 @@ namespace py::cpp::Windows::Devices::Display
488
487
 
489
488
  static PyObject* DisplayMonitor_get_WhitePoint(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
490
489
  {
491
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"WhitePoint"))
492
- {
493
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
494
- return nullptr;
495
- }
496
-
497
490
  try
498
491
  {
492
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"WhitePoint"))
493
+ {
494
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
495
+ return nullptr;
496
+ }
497
+
499
498
  return py::convert(self->obj.WhitePoint());
500
499
  }
501
500
  catch (...)
@@ -507,14 +506,14 @@ namespace py::cpp::Windows::Devices::Display
507
506
 
508
507
  static PyObject* DisplayMonitor_get_IsDolbyVisionSupportedInHdrMode(py::wrapper::Windows::Devices::Display::DisplayMonitor* self, void* /*unused*/) noexcept
509
508
  {
510
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"IsDolbyVisionSupportedInHdrMode"))
511
- {
512
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
513
- return nullptr;
514
- }
515
-
516
509
  try
517
510
  {
511
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Display.DisplayMonitor", L"IsDolbyVisionSupportedInHdrMode"))
512
+ {
513
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
514
+ return nullptr;
515
+ }
516
+
518
517
  return py::convert(self->obj.IsDolbyVisionSupportedInHdrMode());
519
518
  }
520
519
  catch (...)
@@ -579,23 +578,20 @@ namespace py::cpp::Windows::Devices::Display
579
578
  { }
580
579
  };
581
580
 
582
- static PyType_Slot _type_slots_DisplayMonitor[] =
583
- {
581
+ static PyType_Slot _type_slots_DisplayMonitor[] = {
584
582
  { Py_tp_new, reinterpret_cast<void*>(_new_DisplayMonitor) },
585
583
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DisplayMonitor) },
586
584
  { Py_tp_methods, reinterpret_cast<void*>(_methods_DisplayMonitor) },
587
585
  { Py_tp_getset, reinterpret_cast<void*>(_getset_DisplayMonitor) },
588
- { },
586
+ { }
589
587
  };
590
588
 
591
- static PyType_Spec type_spec_DisplayMonitor =
592
- {
589
+ static PyType_Spec type_spec_DisplayMonitor = {
593
590
  "winrt._winrt_windows_devices_display.DisplayMonitor",
594
591
  sizeof(py::wrapper::Windows::Devices::Display::DisplayMonitor),
595
592
  0,
596
593
  Py_TPFLAGS_DEFAULT,
597
- _type_slots_DisplayMonitor
598
- };
594
+ _type_slots_DisplayMonitor};
599
595
 
600
596
  static PyGetSetDef getset_DisplayMonitor_Static[] = {
601
597
  { }
@@ -626,20 +622,19 @@ namespace py::cpp::Windows::Devices::Display
626
622
  };
627
623
 
628
624
  // ----- Windows.Devices.Display Initialization --------------------
629
- PyDoc_STRVAR(module_doc, "Windows::Devices::Display");
630
625
 
626
+ PyDoc_STRVAR(module_doc, "Windows.Devices.Display");
631
627
 
632
- static PyModuleDef module_def
633
- = {PyModuleDef_HEAD_INIT,
634
- "_winrt_windows_devices_display",
635
- module_doc,
636
- 0,
637
- nullptr,
638
- nullptr,
639
- nullptr,
640
- nullptr,
641
- nullptr};
642
-
628
+ static PyModuleDef module_def = {
629
+ PyModuleDef_HEAD_INIT,
630
+ "_winrt_windows_devices_display",
631
+ module_doc,
632
+ 0,
633
+ nullptr,
634
+ nullptr,
635
+ nullptr,
636
+ nullptr,
637
+ nullptr};
643
638
  } // py::cpp::Windows::Devices::Display
644
639
 
645
640
  PyMODINIT_FUNC PyInit__winrt_windows_devices_display(void) noexcept
@@ -1,7 +1,7 @@
1
1
  # WARNING: Please don't edit this file. It was automatically generated.
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
4
+ requires = ["setuptools", "winrt-sdk"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
@@ -30,7 +30,7 @@ dependencies = { file = "requirements.txt" }
30
30
  optional-dependencies.all = { file = "all-requirements.txt" }
31
31
 
32
32
  [tool.setuptools.package-data]
33
- winrt = ["*.pyi"]
33
+ "*" = ["*.pyi", "py.typed"]
34
34
 
35
35
  [tool.cibuildwheel]
36
36
  # use local winrt-sdk build dependency
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.0-beta.2
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,31 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from setuptools.command.build_ext import build_ext
5
+ from winrt_sdk import get_include_dirs
6
+
7
+
8
+ class build_ext_ex(build_ext):
9
+ def build_extension(self, ext):
10
+ if self.compiler.compiler_type == "msvc":
11
+ ext.extra_compile_args = ["/std:c++20", "/permissive-"]
12
+ elif self.compiler.compiler_type == "mingw32":
13
+ ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
14
+ ext.extra_link_args = ["-loleaut32"]
15
+ else:
16
+ raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
17
+
18
+ build_ext.build_extension(self, ext)
19
+
20
+
21
+ setup(
22
+ cmdclass = {'build_ext': build_ext_ex},
23
+ ext_modules=[
24
+ Extension(
25
+ "winrt._winrt_windows_devices_display",
26
+ sources=["py.Windows.Devices.Display.cpp"],
27
+ include_dirs=get_include_dirs(),
28
+ libraries=["windowsapp"],
29
+ )
30
+ ],
31
+ )
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.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.foundation
13
- import winrt.windows.graphics
12
+ import winrt.windows.foundation as windows_foundation
13
+ import winrt.windows.graphics as windows_graphics
14
14
 
15
15
  from winrt.windows.devices.display import DisplayMonitorConnectionKind, DisplayMonitorDescriptorKind, DisplayMonitorPhysicalConnectorKind, DisplayMonitorUsageKind
16
16
 
@@ -18,17 +18,17 @@ Self = typing.TypeVar('Self')
18
18
 
19
19
  @typing.final
20
20
  class DisplayMonitor_Static(type):
21
- def from_id_async(cls, device_id: str, /) -> winrt.windows.foundation.IAsyncOperation[DisplayMonitor]: ...
22
- def from_interface_id_async(cls, device_interface_id: str, /) -> winrt.windows.foundation.IAsyncOperation[DisplayMonitor]: ...
21
+ def from_id_async(cls, device_id: str, /) -> windows_foundation.IAsyncOperation[DisplayMonitor]: ...
22
+ def from_interface_id_async(cls, device_interface_id: str, /) -> windows_foundation.IAsyncOperation[DisplayMonitor]: ...
23
23
  def get_device_selector(cls) -> str: ...
24
24
 
25
25
  @typing.final
26
26
  class DisplayMonitor(winrt.system.Object, metaclass=DisplayMonitor_Static):
27
27
  @staticmethod
28
28
  def _from(obj: winrt.system.Object, /) -> DisplayMonitor: ...
29
- def get_descriptor(self, descriptor_kind: DisplayMonitorDescriptorKind, /) -> winrt.system.UInt8: ...
29
+ def get_descriptor(self, descriptor_kind: DisplayMonitorDescriptorKind, /) -> winrt.system.Array[winrt.system.UInt8]: ...
30
30
  @_property
31
- def blue_primary(self) -> winrt.windows.foundation.Point: ...
31
+ def blue_primary(self) -> windows_foundation.Point: ...
32
32
  @_property
33
33
  def connection_kind(self) -> DisplayMonitorConnectionKind: ...
34
34
  @_property
@@ -36,13 +36,13 @@ class DisplayMonitor(winrt.system.Object, metaclass=DisplayMonitor_Static):
36
36
  @_property
37
37
  def display_adapter_device_id(self) -> str: ...
38
38
  @_property
39
- def display_adapter_id(self) -> winrt.windows.graphics.DisplayAdapterId: ...
39
+ def display_adapter_id(self) -> windows_graphics.DisplayAdapterId: ...
40
40
  @_property
41
41
  def display_adapter_target_id(self) -> winrt.system.UInt32: ...
42
42
  @_property
43
43
  def display_name(self) -> str: ...
44
44
  @_property
45
- def green_primary(self) -> winrt.windows.foundation.Point: ...
45
+ def green_primary(self) -> windows_foundation.Point: ...
46
46
  @_property
47
47
  def max_average_full_frame_luminance_in_nits(self) -> winrt.system.Single: ...
48
48
  @_property
@@ -50,21 +50,21 @@ class DisplayMonitor(winrt.system.Object, metaclass=DisplayMonitor_Static):
50
50
  @_property
51
51
  def min_luminance_in_nits(self) -> winrt.system.Single: ...
52
52
  @_property
53
- def native_resolution_in_raw_pixels(self) -> winrt.windows.graphics.SizeInt32: ...
53
+ def native_resolution_in_raw_pixels(self) -> windows_graphics.SizeInt32: ...
54
54
  @_property
55
55
  def physical_connector(self) -> DisplayMonitorPhysicalConnectorKind: ...
56
56
  @_property
57
- def physical_size_in_inches(self) -> typing.Optional[typing.Optional[winrt.windows.foundation.Size]]: ...
57
+ def physical_size_in_inches(self) -> typing.Optional[typing.Optional[windows_foundation.Size]]: ...
58
58
  @_property
59
59
  def raw_dpi_x(self) -> winrt.system.Single: ...
60
60
  @_property
61
61
  def raw_dpi_y(self) -> winrt.system.Single: ...
62
62
  @_property
63
- def red_primary(self) -> winrt.windows.foundation.Point: ...
63
+ def red_primary(self) -> windows_foundation.Point: ...
64
64
  @_property
65
65
  def usage_kind(self) -> DisplayMonitorUsageKind: ...
66
66
  @_property
67
- def white_point(self) -> winrt.windows.foundation.Point: ...
67
+ def white_point(self) -> windows_foundation.Point: ...
68
68
  @_property
69
69
  def is_dolby_vision_supported_in_hdr_mode(self) -> bool: ...
70
70
 
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.Devices.Display
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,7 +12,10 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
15
16
  Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Graphics[all]==2.1.0; extra == "all"
16
19
 
17
20
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
21
 
@@ -7,6 +7,7 @@ requirements.txt
7
7
  setup.py
8
8
  winrt/_winrt_windows_devices_display.pyi
9
9
  winrt/windows/devices/display/__init__.py
10
+ winrt/windows/devices/display/py.typed
10
11
  winrt_Windows.Devices.Display.egg-info/PKG-INFO
11
12
  winrt_Windows.Devices.Display.egg-info/SOURCES.txt
12
13
  winrt_Windows.Devices.Display.egg-info/dependency_links.txt
@@ -0,0 +1,5 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.1.0
5
+ winrt-Windows.Graphics[all]==2.1.0
@@ -1,4 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
2
-
3
- winrt-Windows.Foundation[all]==2.0.0-beta.2
4
- winrt-Windows.Graphics[all]==2.0.0-beta.2
@@ -1 +0,0 @@
1
- 2.0.0-beta.2
@@ -1,16 +0,0 @@
1
- # WARNING: Please don't edit this file. It was automatically generated.
2
-
3
- from setuptools import Extension, setup
4
- from winrt_sdk import get_include_dirs
5
-
6
- setup(
7
- ext_modules=[
8
- Extension(
9
- "winrt._winrt_windows_devices_display",
10
- sources=["py.Windows.Devices.Display.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- )
@@ -1,5 +0,0 @@
1
- winrt-runtime==2.0.0-beta.2
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.0-beta.2
5
- winrt-Windows.Graphics[all]==2.0.0-beta.2