winrt-Windows.Devices 2.0.0b1__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.
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Devices
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.Devices
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Devices` namespace.
21
+
22
+ This package provides the `winrt.windows.devices` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.Devices
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.Devices` namespace.
6
+
7
+ This package provides the `winrt.windows.devices` module.
@@ -0,0 +1,7 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-Windows.Devices.Adc.Provider[all]==2.0.0-beta.1
4
+ winrt-Windows.Devices.Gpio.Provider[all]==2.0.0-beta.1
5
+ winrt-Windows.Devices.I2c.Provider[all]==2.0.0-beta.1
6
+ winrt-Windows.Devices.Pwm.Provider[all]==2.0.0-beta.1
7
+ winrt-Windows.Devices.Spi.Provider[all]==2.0.0-beta.1
@@ -0,0 +1,585 @@
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ #include "py.Windows.Devices.h"
4
+
5
+
6
+ namespace py::cpp::Windows::Devices
7
+ {
8
+ // ----- LowLevelDevicesAggregateProvider class --------------------
9
+
10
+ static PyObject* _new_LowLevelDevicesAggregateProvider(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
11
+ {
12
+ if (kwds != nullptr)
13
+ {
14
+ py::set_invalid_kwd_args_error();
15
+ return nullptr;
16
+ }
17
+
18
+ auto arg_count = PyTuple_Size(args);
19
+ if (arg_count == 5)
20
+ {
21
+ try
22
+ {
23
+ auto param0 = py::convert_to<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>(args, 0);
24
+ auto param1 = py::convert_to<winrt::Windows::Devices::Pwm::Provider::IPwmControllerProvider>(args, 1);
25
+ auto param2 = py::convert_to<winrt::Windows::Devices::Gpio::Provider::IGpioControllerProvider>(args, 2);
26
+ auto param3 = py::convert_to<winrt::Windows::Devices::I2c::Provider::II2cControllerProvider>(args, 3);
27
+ auto param4 = py::convert_to<winrt::Windows::Devices::Spi::Provider::ISpiControllerProvider>(args, 4);
28
+
29
+ winrt::Windows::Devices::LowLevelDevicesAggregateProvider instance{ param0, param1, param2, param3, param4 };
30
+ return py::wrap(instance, type);
31
+ }
32
+ catch (...)
33
+ {
34
+ py::to_PyErr();
35
+ return nullptr;
36
+ }
37
+ }
38
+ else
39
+ {
40
+ py::set_invalid_arg_count_error(arg_count);
41
+ return nullptr;
42
+ }
43
+ }
44
+
45
+ static void _dealloc_LowLevelDevicesAggregateProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self) noexcept
46
+ {
47
+ auto tp = Py_TYPE(self);
48
+ std::destroy_at(&self->obj);
49
+ tp->tp_free(self);
50
+ Py_DECREF(tp);
51
+ }
52
+
53
+ static PyObject* LowLevelDevicesAggregateProvider_get_AdcControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
54
+ {
55
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"AdcControllerProvider"))
56
+ {
57
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
58
+ return nullptr;
59
+ }
60
+
61
+ try
62
+ {
63
+ return py::convert(self->obj.AdcControllerProvider());
64
+ }
65
+ catch (...)
66
+ {
67
+ py::to_PyErr();
68
+ return nullptr;
69
+ }
70
+ }
71
+
72
+ static PyObject* LowLevelDevicesAggregateProvider_get_GpioControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
73
+ {
74
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"GpioControllerProvider"))
75
+ {
76
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
77
+ return nullptr;
78
+ }
79
+
80
+ try
81
+ {
82
+ return py::convert(self->obj.GpioControllerProvider());
83
+ }
84
+ catch (...)
85
+ {
86
+ py::to_PyErr();
87
+ return nullptr;
88
+ }
89
+ }
90
+
91
+ static PyObject* LowLevelDevicesAggregateProvider_get_I2cControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
92
+ {
93
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"I2cControllerProvider"))
94
+ {
95
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
96
+ return nullptr;
97
+ }
98
+
99
+ try
100
+ {
101
+ return py::convert(self->obj.I2cControllerProvider());
102
+ }
103
+ catch (...)
104
+ {
105
+ py::to_PyErr();
106
+ return nullptr;
107
+ }
108
+ }
109
+
110
+ static PyObject* LowLevelDevicesAggregateProvider_get_PwmControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
111
+ {
112
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"PwmControllerProvider"))
113
+ {
114
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
115
+ return nullptr;
116
+ }
117
+
118
+ try
119
+ {
120
+ return py::convert(self->obj.PwmControllerProvider());
121
+ }
122
+ catch (...)
123
+ {
124
+ py::to_PyErr();
125
+ return nullptr;
126
+ }
127
+ }
128
+
129
+ static PyObject* LowLevelDevicesAggregateProvider_get_SpiControllerProvider(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
130
+ {
131
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesAggregateProvider", L"SpiControllerProvider"))
132
+ {
133
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
134
+ return nullptr;
135
+ }
136
+
137
+ try
138
+ {
139
+ return py::convert(self->obj.SpiControllerProvider());
140
+ }
141
+ catch (...)
142
+ {
143
+ py::to_PyErr();
144
+ return nullptr;
145
+ }
146
+ }
147
+
148
+ static PyObject* _assign_array_LowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* arg) noexcept
149
+ {
150
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::LowLevelDevicesAggregateProvider>>();
151
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
152
+ {
153
+ return nullptr;
154
+ }
155
+ Py_RETURN_NONE;
156
+ }
157
+
158
+ static PyObject* _from_LowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* arg) noexcept
159
+ {
160
+ try
161
+ {
162
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
163
+ return py::convert(return_value.as<winrt::Windows::Devices::LowLevelDevicesAggregateProvider>());
164
+ }
165
+ catch (...)
166
+ {
167
+ py::to_PyErr();
168
+ return nullptr;
169
+ }
170
+ }
171
+
172
+ static PyMethodDef _methods_LowLevelDevicesAggregateProvider[] = {
173
+ { "_assign_array_", _assign_array_LowLevelDevicesAggregateProvider, METH_O | METH_STATIC, nullptr },
174
+ { "_from", reinterpret_cast<PyCFunction>(_from_LowLevelDevicesAggregateProvider), METH_O | METH_STATIC, nullptr },
175
+ { }
176
+ };
177
+
178
+ static PyGetSetDef _getset_LowLevelDevicesAggregateProvider[] = {
179
+ { "adc_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_AdcControllerProvider), nullptr, nullptr, nullptr },
180
+ { "gpio_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_GpioControllerProvider), nullptr, nullptr, nullptr },
181
+ { "i2c_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_I2cControllerProvider), nullptr, nullptr, nullptr },
182
+ { "pwm_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_PwmControllerProvider), nullptr, nullptr, nullptr },
183
+ { "spi_controller_provider", reinterpret_cast<getter>(LowLevelDevicesAggregateProvider_get_SpiControllerProvider), nullptr, nullptr, nullptr },
184
+ { }
185
+ };
186
+
187
+ static PyType_Slot _type_slots_LowLevelDevicesAggregateProvider[] =
188
+ {
189
+ { Py_tp_new, reinterpret_cast<void*>(_new_LowLevelDevicesAggregateProvider) },
190
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LowLevelDevicesAggregateProvider) },
191
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_LowLevelDevicesAggregateProvider) },
192
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_LowLevelDevicesAggregateProvider) },
193
+ { },
194
+ };
195
+
196
+ static PyType_Spec type_spec_LowLevelDevicesAggregateProvider =
197
+ {
198
+ "winrt._winrt_windows_devices.LowLevelDevicesAggregateProvider",
199
+ sizeof(py::wrapper::Windows::Devices::LowLevelDevicesAggregateProvider),
200
+ 0,
201
+ Py_TPFLAGS_DEFAULT,
202
+ _type_slots_LowLevelDevicesAggregateProvider
203
+ };
204
+
205
+ // ----- LowLevelDevicesController class --------------------
206
+
207
+ static PyObject* _new_LowLevelDevicesController(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
208
+ {
209
+ static_assert(py::py_type<winrt::Windows::Devices::LowLevelDevicesController>::type_name);
210
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::LowLevelDevicesController>::type_name);
211
+ return nullptr;
212
+ }
213
+
214
+ static void _dealloc_LowLevelDevicesController(py::wrapper::Windows::Devices::LowLevelDevicesController* self) noexcept
215
+ {
216
+ auto tp = Py_TYPE(self);
217
+ std::destroy_at(&self->obj);
218
+ tp->tp_free(self);
219
+ Py_DECREF(tp);
220
+ }
221
+
222
+ static PyObject* LowLevelDevicesController_get_DefaultProvider(PyObject* /*unused*/, void* /*unused*/) noexcept
223
+ {
224
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesController", L"DefaultProvider"))
225
+ {
226
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
227
+ return nullptr;
228
+ }
229
+
230
+ try
231
+ {
232
+ return py::convert(winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider());
233
+ }
234
+ catch (...)
235
+ {
236
+ py::to_PyErr();
237
+ return nullptr;
238
+ }
239
+ }
240
+
241
+ static int LowLevelDevicesController_put_DefaultProvider(PyObject* /*unused*/, PyObject* arg, void* /*unused*/) noexcept
242
+ {
243
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.LowLevelDevicesController", L"DefaultProvider"))
244
+ {
245
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
246
+ return -1;
247
+ }
248
+
249
+ if (arg == nullptr)
250
+ {
251
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
252
+ return -1;
253
+ }
254
+
255
+ try
256
+ {
257
+ auto param0 = py::convert_to<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>(arg);
258
+
259
+ winrt::Windows::Devices::LowLevelDevicesController::DefaultProvider(param0);
260
+ return 0;
261
+ }
262
+ catch (...)
263
+ {
264
+ py::to_PyErr();
265
+ return -1;
266
+ }
267
+ }
268
+
269
+ static PyObject* _assign_array_LowLevelDevicesController(PyObject* /*unused*/, PyObject* arg) noexcept
270
+ {
271
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::LowLevelDevicesController>>();
272
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
273
+ {
274
+ return nullptr;
275
+ }
276
+ Py_RETURN_NONE;
277
+ }
278
+
279
+ static PyObject* _from_LowLevelDevicesController(PyObject* /*unused*/, PyObject* arg) noexcept
280
+ {
281
+ try
282
+ {
283
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
284
+ return py::convert(return_value.as<winrt::Windows::Devices::LowLevelDevicesController>());
285
+ }
286
+ catch (...)
287
+ {
288
+ py::to_PyErr();
289
+ return nullptr;
290
+ }
291
+ }
292
+
293
+ static PyMethodDef _methods_LowLevelDevicesController[] = {
294
+ { "_assign_array_", _assign_array_LowLevelDevicesController, METH_O | METH_STATIC, nullptr },
295
+ { "_from", reinterpret_cast<PyCFunction>(_from_LowLevelDevicesController), METH_O | METH_STATIC, nullptr },
296
+ { }
297
+ };
298
+
299
+ static PyGetSetDef _getset_LowLevelDevicesController[] = {
300
+ { }
301
+ };
302
+
303
+ static PyType_Slot _type_slots_LowLevelDevicesController[] =
304
+ {
305
+ { Py_tp_new, reinterpret_cast<void*>(_new_LowLevelDevicesController) },
306
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_LowLevelDevicesController) },
307
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_LowLevelDevicesController) },
308
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_LowLevelDevicesController) },
309
+ { },
310
+ };
311
+
312
+ static PyType_Spec type_spec_LowLevelDevicesController =
313
+ {
314
+ "winrt._winrt_windows_devices.LowLevelDevicesController",
315
+ sizeof(py::wrapper::Windows::Devices::LowLevelDevicesController),
316
+ 0,
317
+ Py_TPFLAGS_DEFAULT,
318
+ _type_slots_LowLevelDevicesController
319
+ };
320
+
321
+ static PyGetSetDef getset_LowLevelDevicesController_Static[] = {
322
+ { "default_provider", reinterpret_cast<getter>(LowLevelDevicesController_get_DefaultProvider), reinterpret_cast<setter>(LowLevelDevicesController_put_DefaultProvider), nullptr, nullptr },
323
+ { }
324
+ };
325
+
326
+ static PyMethodDef methods_LowLevelDevicesController_Static[] = {
327
+ { }
328
+ };
329
+
330
+ static PyType_Slot type_slots_LowLevelDevicesController_Static[] =
331
+ {
332
+ { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
333
+ { Py_tp_getset, reinterpret_cast<void*>(getset_LowLevelDevicesController_Static) },
334
+ { Py_tp_methods, reinterpret_cast<void*>(methods_LowLevelDevicesController_Static) },
335
+ { }
336
+ };
337
+
338
+ static PyType_Spec type_spec_LowLevelDevicesController_Static =
339
+ {
340
+ "winrt._winrt_windows_devices.LowLevelDevicesController_Static",
341
+ static_cast<int>(PyType_Type.tp_basicsize),
342
+ static_cast<int>(PyType_Type.tp_itemsize),
343
+ Py_TPFLAGS_DEFAULT,
344
+ type_slots_LowLevelDevicesController_Static
345
+ };
346
+
347
+ // ----- ILowLevelDevicesAggregateProvider interface --------------------
348
+
349
+ static PyObject* _new_ILowLevelDevicesAggregateProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
350
+ {
351
+ static_assert(py::py_type<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>::type_name);
352
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>::type_name);
353
+ return nullptr;
354
+ }
355
+
356
+ static void _dealloc_ILowLevelDevicesAggregateProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self) noexcept
357
+ {
358
+ auto tp = Py_TYPE(self);
359
+ std::destroy_at(&self->obj);
360
+ tp->tp_free(self);
361
+ Py_DECREF(tp);
362
+ }
363
+
364
+ static PyObject* ILowLevelDevicesAggregateProvider_get_AdcControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
365
+ {
366
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"AdcControllerProvider"))
367
+ {
368
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
369
+ return nullptr;
370
+ }
371
+
372
+ try
373
+ {
374
+ return py::convert(self->obj.AdcControllerProvider());
375
+ }
376
+ catch (...)
377
+ {
378
+ py::to_PyErr();
379
+ return nullptr;
380
+ }
381
+ }
382
+
383
+ static PyObject* ILowLevelDevicesAggregateProvider_get_GpioControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
384
+ {
385
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"GpioControllerProvider"))
386
+ {
387
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
388
+ return nullptr;
389
+ }
390
+
391
+ try
392
+ {
393
+ return py::convert(self->obj.GpioControllerProvider());
394
+ }
395
+ catch (...)
396
+ {
397
+ py::to_PyErr();
398
+ return nullptr;
399
+ }
400
+ }
401
+
402
+ static PyObject* ILowLevelDevicesAggregateProvider_get_I2cControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
403
+ {
404
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"I2cControllerProvider"))
405
+ {
406
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
407
+ return nullptr;
408
+ }
409
+
410
+ try
411
+ {
412
+ return py::convert(self->obj.I2cControllerProvider());
413
+ }
414
+ catch (...)
415
+ {
416
+ py::to_PyErr();
417
+ return nullptr;
418
+ }
419
+ }
420
+
421
+ static PyObject* ILowLevelDevicesAggregateProvider_get_PwmControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
422
+ {
423
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"PwmControllerProvider"))
424
+ {
425
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
426
+ return nullptr;
427
+ }
428
+
429
+ try
430
+ {
431
+ return py::convert(self->obj.PwmControllerProvider());
432
+ }
433
+ catch (...)
434
+ {
435
+ py::to_PyErr();
436
+ return nullptr;
437
+ }
438
+ }
439
+
440
+ static PyObject* ILowLevelDevicesAggregateProvider_get_SpiControllerProvider(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider* self, void* /*unused*/) noexcept
441
+ {
442
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.ILowLevelDevicesAggregateProvider", L"SpiControllerProvider"))
443
+ {
444
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
445
+ return nullptr;
446
+ }
447
+
448
+ try
449
+ {
450
+ return py::convert(self->obj.SpiControllerProvider());
451
+ }
452
+ catch (...)
453
+ {
454
+ py::to_PyErr();
455
+ return nullptr;
456
+ }
457
+ }
458
+
459
+ static PyObject* _assign_array_ILowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* arg) noexcept
460
+ {
461
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>>();
462
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
463
+ {
464
+ return nullptr;
465
+ }
466
+ Py_RETURN_NONE;
467
+ }
468
+
469
+ static PyObject* _from_ILowLevelDevicesAggregateProvider(PyObject* /*unused*/, PyObject* arg) noexcept
470
+ {
471
+ try
472
+ {
473
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
474
+ return py::convert(return_value.as<winrt::Windows::Devices::ILowLevelDevicesAggregateProvider>());
475
+ }
476
+ catch (...)
477
+ {
478
+ py::to_PyErr();
479
+ return nullptr;
480
+ }
481
+ }
482
+
483
+ static PyMethodDef _methods_ILowLevelDevicesAggregateProvider[] = {
484
+ { "_assign_array_", _assign_array_ILowLevelDevicesAggregateProvider, METH_O | METH_STATIC, nullptr },
485
+ { "_from", reinterpret_cast<PyCFunction>(_from_ILowLevelDevicesAggregateProvider), METH_O | METH_STATIC, nullptr },
486
+ { }
487
+ };
488
+
489
+ static PyGetSetDef _getset_ILowLevelDevicesAggregateProvider[] = {
490
+ { "adc_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_AdcControllerProvider), nullptr, nullptr, nullptr },
491
+ { "gpio_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_GpioControllerProvider), nullptr, nullptr, nullptr },
492
+ { "i2c_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_I2cControllerProvider), nullptr, nullptr, nullptr },
493
+ { "pwm_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_PwmControllerProvider), nullptr, nullptr, nullptr },
494
+ { "spi_controller_provider", reinterpret_cast<getter>(ILowLevelDevicesAggregateProvider_get_SpiControllerProvider), nullptr, nullptr, nullptr },
495
+ { }
496
+ };
497
+
498
+ static PyType_Slot _type_slots_ILowLevelDevicesAggregateProvider[] =
499
+ {
500
+ { Py_tp_new, reinterpret_cast<void*>(_new_ILowLevelDevicesAggregateProvider) },
501
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ILowLevelDevicesAggregateProvider) },
502
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_ILowLevelDevicesAggregateProvider) },
503
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_ILowLevelDevicesAggregateProvider) },
504
+ { },
505
+ };
506
+
507
+ static PyType_Spec type_spec_ILowLevelDevicesAggregateProvider =
508
+ {
509
+ "winrt._winrt_windows_devices.ILowLevelDevicesAggregateProvider",
510
+ sizeof(py::wrapper::Windows::Devices::ILowLevelDevicesAggregateProvider),
511
+ 0,
512
+ Py_TPFLAGS_DEFAULT,
513
+ _type_slots_ILowLevelDevicesAggregateProvider
514
+ };
515
+
516
+ // ----- Windows.Devices Initialization --------------------
517
+ PyDoc_STRVAR(module_doc, "Windows::Devices");
518
+
519
+
520
+ static PyModuleDef module_def
521
+ = {PyModuleDef_HEAD_INIT,
522
+ "_winrt_windows_devices",
523
+ module_doc,
524
+ 0,
525
+ nullptr,
526
+ nullptr,
527
+ nullptr,
528
+ nullptr,
529
+ nullptr};
530
+
531
+ } // py::cpp::Windows::Devices
532
+
533
+ PyMODINIT_FUNC PyInit__winrt_windows_devices(void) noexcept
534
+ {
535
+ using namespace py::cpp::Windows::Devices;
536
+
537
+ if (py::import_winrt_runtime() == -1)
538
+ {
539
+ return nullptr;
540
+ }
541
+
542
+ py::pyobj_handle module{PyModule_Create(&module_def)};
543
+
544
+ if (!module)
545
+ {
546
+ return nullptr;
547
+ }
548
+
549
+ auto object_type = py::get_object_type();
550
+ if (!object_type)
551
+ {
552
+ return nullptr;
553
+ }
554
+
555
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
556
+
557
+ if (!object_bases)
558
+ {
559
+ return nullptr;
560
+ }
561
+
562
+ if (py::register_python_type(module.get(), &type_spec_LowLevelDevicesAggregateProvider, object_bases.get(), nullptr) == -1)
563
+ {
564
+ return nullptr;
565
+ }
566
+
567
+ py::pyobj_handle type_LowLevelDevicesController_Static{PyType_FromSpec(&type_spec_LowLevelDevicesController_Static)};
568
+ if (!type_LowLevelDevicesController_Static)
569
+ {
570
+ return nullptr;
571
+ }
572
+
573
+ if (py::register_python_type(module.get(), &type_spec_LowLevelDevicesController, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_LowLevelDevicesController_Static.get())) == -1)
574
+ {
575
+ return nullptr;
576
+ }
577
+
578
+ if (py::register_python_type(module.get(), &type_spec_ILowLevelDevicesAggregateProvider, object_bases.get(), nullptr) == -1)
579
+ {
580
+ return nullptr;
581
+ }
582
+
583
+
584
+ return module.detach();
585
+ }
@@ -0,0 +1,43 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ [build-system]
4
+ requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "winrt-Windows.Devices"
9
+ description = "Python projection of Windows Runtime (WinRT) APIs"
10
+ readme = "README.md"
11
+ license = { text = "MIT" }
12
+ classifiers = [
13
+ "Operating System :: Microsoft :: Windows",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: Implementation :: CPython",
16
+ "Intended Audience :: Developers",
17
+ ]
18
+ dynamic = ["version", "dependencies", "optional-dependencies"]
19
+ requires-python = ">=3.9,<3.13"
20
+
21
+ [project.urls]
22
+ # Homepage = "https://github.com/pywrint/pywrinrt"
23
+ # Documentation = "https://readthedocs.org"
24
+ Repository = "https://github.com/pywrint/pywrinrt"
25
+ Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
26
+
27
+ [tool.setuptools.dynamic]
28
+ version = { file = "pywinrt-version.txt" }
29
+ dependencies = { file = "requirements.txt" }
30
+ optional-dependencies.all = { file = "all-requirements.txt" }
31
+
32
+ [tool.cibuildwheel]
33
+ # use local winrt-sdk build dependency
34
+ environment = { PYTHONPATH="../winrt-sdk/src" }
35
+ # don't install winrt-sdk from PyPI
36
+ build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
37
+ # don't build for PyPy
38
+ skip = "pp*"
39
+ # suppress warnings about ARM64 testing
40
+ test-skip = "*-win_arm64"
41
+
42
+ [tool.cibuildwheel.windows]
43
+ archs = ["x86", "AMD64", "ARM64"]
@@ -0,0 +1 @@
1
+ 2.0.0-beta.1
@@ -0,0 +1,3 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-runtime==2.0.0-beta.1
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
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",
10
+ sources=["py.Windows.Devices.cpp"],
11
+ include_dirs=get_include_dirs(),
12
+ extra_compile_args=["/std:c++20", "/permissive-"],
13
+ libraries=["windowsapp"],
14
+ )
15
+ ],
16
+ package_data={"winrt": ["*.pyi"]},
17
+ )
@@ -0,0 +1,58 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import datetime
4
+ import sys
5
+ import types
6
+ import typing
7
+ import uuid as _uuid
8
+ from builtins import property as _property
9
+
10
+ import winrt._winrt
11
+ import winrt.system
12
+ import winrt.windows.devices.adc.provider
13
+ import winrt.windows.devices.gpio.provider
14
+ import winrt.windows.devices.i2c.provider
15
+ import winrt.windows.devices.pwm.provider
16
+ import winrt.windows.devices.spi.provider
17
+
18
+ Self = typing.TypeVar('Self')
19
+
20
+ class LowLevelDevicesAggregateProvider(winrt.system.Object):
21
+ @staticmethod
22
+ def _from(obj: winrt.system.Object, /) -> LowLevelDevicesAggregateProvider: ...
23
+ def __new__(cls: typing.Type[LowLevelDevicesAggregateProvider], adc: typing.Optional[winrt.windows.devices.adc.provider.IAdcControllerProvider], pwm: typing.Optional[winrt.windows.devices.pwm.provider.IPwmControllerProvider], gpio: typing.Optional[winrt.windows.devices.gpio.provider.IGpioControllerProvider], i2c: typing.Optional[winrt.windows.devices.i2c.provider.II2cControllerProvider], spi: typing.Optional[winrt.windows.devices.spi.provider.ISpiControllerProvider]) -> LowLevelDevicesAggregateProvider:...
24
+ @_property
25
+ def adc_controller_provider(self) -> typing.Optional[winrt.windows.devices.adc.provider.IAdcControllerProvider]: ...
26
+ @_property
27
+ def gpio_controller_provider(self) -> typing.Optional[winrt.windows.devices.gpio.provider.IGpioControllerProvider]: ...
28
+ @_property
29
+ def i2c_controller_provider(self) -> typing.Optional[winrt.windows.devices.i2c.provider.II2cControllerProvider]: ...
30
+ @_property
31
+ def pwm_controller_provider(self) -> typing.Optional[winrt.windows.devices.pwm.provider.IPwmControllerProvider]: ...
32
+ @_property
33
+ def spi_controller_provider(self) -> typing.Optional[winrt.windows.devices.spi.provider.ISpiControllerProvider]: ...
34
+
35
+ class LowLevelDevicesController_Static(type):
36
+ @_property
37
+ def default_provider(cls) -> typing.Optional[ILowLevelDevicesAggregateProvider]: ...
38
+ @default_provider.setter
39
+ def default_provider(cls, value: typing.Optional[ILowLevelDevicesAggregateProvider]) -> None: ...
40
+
41
+ class LowLevelDevicesController(winrt.system.Object, metaclass=LowLevelDevicesController_Static):
42
+ @staticmethod
43
+ def _from(obj: winrt.system.Object, /) -> LowLevelDevicesController: ...
44
+
45
+ class ILowLevelDevicesAggregateProvider(winrt.system.Object):
46
+ @staticmethod
47
+ def _from(obj: winrt.system.Object, /) -> ILowLevelDevicesAggregateProvider: ...
48
+ @_property
49
+ def adc_controller_provider(self) -> typing.Optional[winrt.windows.devices.adc.provider.IAdcControllerProvider]: ...
50
+ @_property
51
+ def gpio_controller_provider(self) -> typing.Optional[winrt.windows.devices.gpio.provider.IGpioControllerProvider]: ...
52
+ @_property
53
+ def i2c_controller_provider(self) -> typing.Optional[winrt.windows.devices.i2c.provider.II2cControllerProvider]: ...
54
+ @_property
55
+ def pwm_controller_provider(self) -> typing.Optional[winrt.windows.devices.pwm.provider.IPwmControllerProvider]: ...
56
+ @_property
57
+ def spi_controller_provider(self) -> typing.Optional[winrt.windows.devices.spi.provider.ISpiControllerProvider]: ...
58
+
@@ -0,0 +1,14 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import winrt.system
4
+ from winrt import _winrt_windows_devices
5
+
6
+ __all__ = [
7
+ "LowLevelDevicesAggregateProvider",
8
+ "LowLevelDevicesController",
9
+ "ILowLevelDevicesAggregateProvider",
10
+ ]
11
+
12
+ LowLevelDevicesAggregateProvider = _winrt_windows_devices.LowLevelDevicesAggregateProvider
13
+ LowLevelDevicesController = _winrt_windows_devices.LowLevelDevicesController
14
+ ILowLevelDevicesAggregateProvider = _winrt_windows_devices.ILowLevelDevicesAggregateProvider
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Devices
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.Devices
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Devices` namespace.
21
+
22
+ This package provides the `winrt.windows.devices` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.Devices.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_devices.pyi
9
+ winrt/windows/devices/__init__.py
10
+ winrt_Windows.Devices.egg-info/PKG-INFO
11
+ winrt_Windows.Devices.egg-info/SOURCES.txt
12
+ winrt_Windows.Devices.egg-info/dependency_links.txt
13
+ winrt_Windows.Devices.egg-info/requires.txt
14
+ winrt_Windows.Devices.egg-info/top_level.txt
@@ -0,0 +1,8 @@
1
+ winrt-runtime==2.0.0-beta.1
2
+
3
+ [all]
4
+ winrt-Windows.Devices.Adc.Provider[all]==2.0.0-beta.1
5
+ winrt-Windows.Devices.Gpio.Provider[all]==2.0.0-beta.1
6
+ winrt-Windows.Devices.I2c.Provider[all]==2.0.0-beta.1
7
+ winrt-Windows.Devices.Pwm.Provider[all]==2.0.0-beta.1
8
+ winrt-Windows.Devices.Spi.Provider[all]==2.0.0-beta.1