winrt-Windows.Devices.Adc 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.Adc
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.Adc
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Devices.Adc` namespace.
21
+
22
+ This package provides the `winrt.windows.devices.adc` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.Devices.Adc
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.Devices.Adc` namespace.
6
+
7
+ This package provides the `winrt.windows.devices.adc` module.
@@ -0,0 +1,5 @@
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.Foundation[all]==2.0.0-beta.1
5
+ winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
@@ -0,0 +1,621 @@
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.Adc.h"
4
+
5
+
6
+ namespace py::cpp::Windows::Devices::Adc
7
+ {
8
+ // ----- AdcChannel class --------------------
9
+
10
+ static PyObject* _new_AdcChannel(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
11
+ {
12
+ static_assert(py::py_type<winrt::Windows::Devices::Adc::AdcChannel>::type_name);
13
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Adc::AdcChannel>::type_name);
14
+ return nullptr;
15
+ }
16
+
17
+ static void _dealloc_AdcChannel(py::wrapper::Windows::Devices::Adc::AdcChannel* self) noexcept
18
+ {
19
+ auto tp = Py_TYPE(self);
20
+ std::destroy_at(&self->obj);
21
+ tp->tp_free(self);
22
+ Py_DECREF(tp);
23
+ }
24
+
25
+ static PyObject* AdcChannel_Close(py::wrapper::Windows::Devices::Adc::AdcChannel* self, PyObject* args) noexcept
26
+ {
27
+ auto arg_count = PyTuple_Size(args);
28
+
29
+ if (arg_count == 0)
30
+ {
31
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcChannel", L"Close", 0))
32
+ {
33
+ py::set_arg_count_version_error(0);
34
+ return nullptr;
35
+ }
36
+
37
+ try
38
+ {
39
+ self->obj.Close();
40
+ Py_RETURN_NONE;
41
+ }
42
+ catch (...)
43
+ {
44
+ py::to_PyErr();
45
+ return nullptr;
46
+ }
47
+ }
48
+ else
49
+ {
50
+ py::set_invalid_arg_count_error(arg_count);
51
+ return nullptr;
52
+ }
53
+ }
54
+
55
+ static PyObject* AdcChannel_ReadRatio(py::wrapper::Windows::Devices::Adc::AdcChannel* self, PyObject* args) noexcept
56
+ {
57
+ auto arg_count = PyTuple_Size(args);
58
+
59
+ if (arg_count == 0)
60
+ {
61
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcChannel", L"ReadRatio", 0))
62
+ {
63
+ py::set_arg_count_version_error(0);
64
+ return nullptr;
65
+ }
66
+
67
+ try
68
+ {
69
+ return py::convert(self->obj.ReadRatio());
70
+ }
71
+ catch (...)
72
+ {
73
+ py::to_PyErr();
74
+ return nullptr;
75
+ }
76
+ }
77
+ else
78
+ {
79
+ py::set_invalid_arg_count_error(arg_count);
80
+ return nullptr;
81
+ }
82
+ }
83
+
84
+ static PyObject* AdcChannel_ReadValue(py::wrapper::Windows::Devices::Adc::AdcChannel* self, PyObject* args) noexcept
85
+ {
86
+ auto arg_count = PyTuple_Size(args);
87
+
88
+ if (arg_count == 0)
89
+ {
90
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcChannel", L"ReadValue", 0))
91
+ {
92
+ py::set_arg_count_version_error(0);
93
+ return nullptr;
94
+ }
95
+
96
+ try
97
+ {
98
+ return py::convert(self->obj.ReadValue());
99
+ }
100
+ catch (...)
101
+ {
102
+ py::to_PyErr();
103
+ return nullptr;
104
+ }
105
+ }
106
+ else
107
+ {
108
+ py::set_invalid_arg_count_error(arg_count);
109
+ return nullptr;
110
+ }
111
+ }
112
+
113
+ static PyObject* AdcChannel_get_Controller(py::wrapper::Windows::Devices::Adc::AdcChannel* self, void* /*unused*/) noexcept
114
+ {
115
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcChannel", L"Controller"))
116
+ {
117
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
118
+ return nullptr;
119
+ }
120
+
121
+ try
122
+ {
123
+ return py::convert(self->obj.Controller());
124
+ }
125
+ catch (...)
126
+ {
127
+ py::to_PyErr();
128
+ return nullptr;
129
+ }
130
+ }
131
+
132
+ static PyObject* _assign_array_AdcChannel(PyObject* /*unused*/, PyObject* arg) noexcept
133
+ {
134
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Adc::AdcChannel>>();
135
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
136
+ {
137
+ return nullptr;
138
+ }
139
+ Py_RETURN_NONE;
140
+ }
141
+
142
+ static PyObject* _from_AdcChannel(PyObject* /*unused*/, PyObject* arg) noexcept
143
+ {
144
+ try
145
+ {
146
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
147
+ return py::convert(return_value.as<winrt::Windows::Devices::Adc::AdcChannel>());
148
+ }
149
+ catch (...)
150
+ {
151
+ py::to_PyErr();
152
+ return nullptr;
153
+ }
154
+ }
155
+
156
+ static PyObject* _enter_AdcChannel(py::wrapper::Windows::Devices::Adc::AdcChannel* self, PyObject* /*unused*/) noexcept
157
+ {
158
+ return Py_NewRef(self);
159
+ }
160
+
161
+ static PyObject* _exit_AdcChannel(py::wrapper::Windows::Devices::Adc::AdcChannel* self, PyObject* /*unused*/) noexcept
162
+ {
163
+ try
164
+ {
165
+ self->obj.Close();
166
+ Py_RETURN_FALSE;
167
+ }
168
+ catch (...)
169
+ {
170
+ py::to_PyErr();
171
+ return nullptr;
172
+ }
173
+ }
174
+
175
+ static PyMethodDef _methods_AdcChannel[] = {
176
+ { "close", reinterpret_cast<PyCFunction>(AdcChannel_Close), METH_VARARGS, nullptr },
177
+ { "read_ratio", reinterpret_cast<PyCFunction>(AdcChannel_ReadRatio), METH_VARARGS, nullptr },
178
+ { "read_value", reinterpret_cast<PyCFunction>(AdcChannel_ReadValue), METH_VARARGS, nullptr },
179
+ { "_assign_array_", _assign_array_AdcChannel, METH_O | METH_STATIC, nullptr },
180
+ { "_from", reinterpret_cast<PyCFunction>(_from_AdcChannel), METH_O | METH_STATIC, nullptr },
181
+ { "__enter__", reinterpret_cast<PyCFunction>(_enter_AdcChannel), METH_NOARGS, nullptr },
182
+ { "__exit__", reinterpret_cast<PyCFunction>(_exit_AdcChannel), METH_VARARGS, nullptr },
183
+ { }
184
+ };
185
+
186
+ static PyGetSetDef _getset_AdcChannel[] = {
187
+ { "controller", reinterpret_cast<getter>(AdcChannel_get_Controller), nullptr, nullptr, nullptr },
188
+ { }
189
+ };
190
+
191
+ static PyType_Slot _type_slots_AdcChannel[] =
192
+ {
193
+ { Py_tp_new, reinterpret_cast<void*>(_new_AdcChannel) },
194
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AdcChannel) },
195
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_AdcChannel) },
196
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_AdcChannel) },
197
+ { },
198
+ };
199
+
200
+ static PyType_Spec type_spec_AdcChannel =
201
+ {
202
+ "winrt._winrt_windows_devices_adc.AdcChannel",
203
+ sizeof(py::wrapper::Windows::Devices::Adc::AdcChannel),
204
+ 0,
205
+ Py_TPFLAGS_DEFAULT,
206
+ _type_slots_AdcChannel
207
+ };
208
+
209
+ // ----- AdcController class --------------------
210
+
211
+ static PyObject* _new_AdcController(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
212
+ {
213
+ static_assert(py::py_type<winrt::Windows::Devices::Adc::AdcController>::type_name);
214
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Adc::AdcController>::type_name);
215
+ return nullptr;
216
+ }
217
+
218
+ static void _dealloc_AdcController(py::wrapper::Windows::Devices::Adc::AdcController* self) noexcept
219
+ {
220
+ auto tp = Py_TYPE(self);
221
+ std::destroy_at(&self->obj);
222
+ tp->tp_free(self);
223
+ Py_DECREF(tp);
224
+ }
225
+
226
+ static PyObject* AdcController_GetControllersAsync(PyObject* /*unused*/, PyObject* args) noexcept
227
+ {
228
+ auto arg_count = PyTuple_Size(args);
229
+
230
+ if (arg_count == 1)
231
+ {
232
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcController", L"GetControllersAsync", 1))
233
+ {
234
+ py::set_arg_count_version_error(1);
235
+ return nullptr;
236
+ }
237
+
238
+ try
239
+ {
240
+ auto param0 = py::convert_to<winrt::Windows::Devices::Adc::Provider::IAdcProvider>(args, 0);
241
+
242
+ return py::convert(winrt::Windows::Devices::Adc::AdcController::GetControllersAsync(param0));
243
+ }
244
+ catch (...)
245
+ {
246
+ py::to_PyErr();
247
+ return nullptr;
248
+ }
249
+ }
250
+ else
251
+ {
252
+ py::set_invalid_arg_count_error(arg_count);
253
+ return nullptr;
254
+ }
255
+ }
256
+
257
+ static PyObject* AdcController_GetDefaultAsync(PyObject* /*unused*/, PyObject* args) noexcept
258
+ {
259
+ auto arg_count = PyTuple_Size(args);
260
+
261
+ if (arg_count == 0)
262
+ {
263
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcController", L"GetDefaultAsync", 0))
264
+ {
265
+ py::set_arg_count_version_error(0);
266
+ return nullptr;
267
+ }
268
+
269
+ try
270
+ {
271
+ return py::convert(winrt::Windows::Devices::Adc::AdcController::GetDefaultAsync());
272
+ }
273
+ catch (...)
274
+ {
275
+ py::to_PyErr();
276
+ return nullptr;
277
+ }
278
+ }
279
+ else
280
+ {
281
+ py::set_invalid_arg_count_error(arg_count);
282
+ return nullptr;
283
+ }
284
+ }
285
+
286
+ static PyObject* AdcController_IsChannelModeSupported(py::wrapper::Windows::Devices::Adc::AdcController* self, PyObject* args) noexcept
287
+ {
288
+ auto arg_count = PyTuple_Size(args);
289
+
290
+ if (arg_count == 1)
291
+ {
292
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcController", L"IsChannelModeSupported", 1))
293
+ {
294
+ py::set_arg_count_version_error(1);
295
+ return nullptr;
296
+ }
297
+
298
+ try
299
+ {
300
+ auto param0 = py::convert_to<winrt::Windows::Devices::Adc::AdcChannelMode>(args, 0);
301
+
302
+ return py::convert(self->obj.IsChannelModeSupported(param0));
303
+ }
304
+ catch (...)
305
+ {
306
+ py::to_PyErr();
307
+ return nullptr;
308
+ }
309
+ }
310
+ else
311
+ {
312
+ py::set_invalid_arg_count_error(arg_count);
313
+ return nullptr;
314
+ }
315
+ }
316
+
317
+ static PyObject* AdcController_OpenChannel(py::wrapper::Windows::Devices::Adc::AdcController* self, PyObject* args) noexcept
318
+ {
319
+ auto arg_count = PyTuple_Size(args);
320
+
321
+ if (arg_count == 1)
322
+ {
323
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Devices.Adc.AdcController", L"OpenChannel", 1))
324
+ {
325
+ py::set_arg_count_version_error(1);
326
+ return nullptr;
327
+ }
328
+
329
+ try
330
+ {
331
+ auto param0 = py::convert_to<int32_t>(args, 0);
332
+
333
+ return py::convert(self->obj.OpenChannel(param0));
334
+ }
335
+ catch (...)
336
+ {
337
+ py::to_PyErr();
338
+ return nullptr;
339
+ }
340
+ }
341
+ else
342
+ {
343
+ py::set_invalid_arg_count_error(arg_count);
344
+ return nullptr;
345
+ }
346
+ }
347
+
348
+ static PyObject* AdcController_get_ChannelMode(py::wrapper::Windows::Devices::Adc::AdcController* self, void* /*unused*/) noexcept
349
+ {
350
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcController", L"ChannelMode"))
351
+ {
352
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
353
+ return nullptr;
354
+ }
355
+
356
+ try
357
+ {
358
+ return py::convert(self->obj.ChannelMode());
359
+ }
360
+ catch (...)
361
+ {
362
+ py::to_PyErr();
363
+ return nullptr;
364
+ }
365
+ }
366
+
367
+ static int AdcController_put_ChannelMode(py::wrapper::Windows::Devices::Adc::AdcController* self, PyObject* arg, void* /*unused*/) noexcept
368
+ {
369
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcController", L"ChannelMode"))
370
+ {
371
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
372
+ return -1;
373
+ }
374
+
375
+ if (arg == nullptr)
376
+ {
377
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
378
+ return -1;
379
+ }
380
+
381
+ try
382
+ {
383
+ auto param0 = py::convert_to<winrt::Windows::Devices::Adc::AdcChannelMode>(arg);
384
+
385
+ self->obj.ChannelMode(param0);
386
+ return 0;
387
+ }
388
+ catch (...)
389
+ {
390
+ py::to_PyErr();
391
+ return -1;
392
+ }
393
+ }
394
+
395
+ static PyObject* AdcController_get_ChannelCount(py::wrapper::Windows::Devices::Adc::AdcController* self, void* /*unused*/) noexcept
396
+ {
397
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcController", L"ChannelCount"))
398
+ {
399
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
400
+ return nullptr;
401
+ }
402
+
403
+ try
404
+ {
405
+ return py::convert(self->obj.ChannelCount());
406
+ }
407
+ catch (...)
408
+ {
409
+ py::to_PyErr();
410
+ return nullptr;
411
+ }
412
+ }
413
+
414
+ static PyObject* AdcController_get_MaxValue(py::wrapper::Windows::Devices::Adc::AdcController* self, void* /*unused*/) noexcept
415
+ {
416
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcController", L"MaxValue"))
417
+ {
418
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
419
+ return nullptr;
420
+ }
421
+
422
+ try
423
+ {
424
+ return py::convert(self->obj.MaxValue());
425
+ }
426
+ catch (...)
427
+ {
428
+ py::to_PyErr();
429
+ return nullptr;
430
+ }
431
+ }
432
+
433
+ static PyObject* AdcController_get_MinValue(py::wrapper::Windows::Devices::Adc::AdcController* self, void* /*unused*/) noexcept
434
+ {
435
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcController", L"MinValue"))
436
+ {
437
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
438
+ return nullptr;
439
+ }
440
+
441
+ try
442
+ {
443
+ return py::convert(self->obj.MinValue());
444
+ }
445
+ catch (...)
446
+ {
447
+ py::to_PyErr();
448
+ return nullptr;
449
+ }
450
+ }
451
+
452
+ static PyObject* AdcController_get_ResolutionInBits(py::wrapper::Windows::Devices::Adc::AdcController* self, void* /*unused*/) noexcept
453
+ {
454
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Devices.Adc.AdcController", L"ResolutionInBits"))
455
+ {
456
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
457
+ return nullptr;
458
+ }
459
+
460
+ try
461
+ {
462
+ return py::convert(self->obj.ResolutionInBits());
463
+ }
464
+ catch (...)
465
+ {
466
+ py::to_PyErr();
467
+ return nullptr;
468
+ }
469
+ }
470
+
471
+ static PyObject* _assign_array_AdcController(PyObject* /*unused*/, PyObject* arg) noexcept
472
+ {
473
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Adc::AdcController>>();
474
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
475
+ {
476
+ return nullptr;
477
+ }
478
+ Py_RETURN_NONE;
479
+ }
480
+
481
+ static PyObject* _from_AdcController(PyObject* /*unused*/, PyObject* arg) noexcept
482
+ {
483
+ try
484
+ {
485
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
486
+ return py::convert(return_value.as<winrt::Windows::Devices::Adc::AdcController>());
487
+ }
488
+ catch (...)
489
+ {
490
+ py::to_PyErr();
491
+ return nullptr;
492
+ }
493
+ }
494
+
495
+ static PyMethodDef _methods_AdcController[] = {
496
+ { "is_channel_mode_supported", reinterpret_cast<PyCFunction>(AdcController_IsChannelModeSupported), METH_VARARGS, nullptr },
497
+ { "open_channel", reinterpret_cast<PyCFunction>(AdcController_OpenChannel), METH_VARARGS, nullptr },
498
+ { "_assign_array_", _assign_array_AdcController, METH_O | METH_STATIC, nullptr },
499
+ { "_from", reinterpret_cast<PyCFunction>(_from_AdcController), METH_O | METH_STATIC, nullptr },
500
+ { }
501
+ };
502
+
503
+ static PyGetSetDef _getset_AdcController[] = {
504
+ { "channel_mode", reinterpret_cast<getter>(AdcController_get_ChannelMode), reinterpret_cast<setter>(AdcController_put_ChannelMode), nullptr, nullptr },
505
+ { "channel_count", reinterpret_cast<getter>(AdcController_get_ChannelCount), nullptr, nullptr, nullptr },
506
+ { "max_value", reinterpret_cast<getter>(AdcController_get_MaxValue), nullptr, nullptr, nullptr },
507
+ { "min_value", reinterpret_cast<getter>(AdcController_get_MinValue), nullptr, nullptr, nullptr },
508
+ { "resolution_in_bits", reinterpret_cast<getter>(AdcController_get_ResolutionInBits), nullptr, nullptr, nullptr },
509
+ { }
510
+ };
511
+
512
+ static PyType_Slot _type_slots_AdcController[] =
513
+ {
514
+ { Py_tp_new, reinterpret_cast<void*>(_new_AdcController) },
515
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_AdcController) },
516
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_AdcController) },
517
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_AdcController) },
518
+ { },
519
+ };
520
+
521
+ static PyType_Spec type_spec_AdcController =
522
+ {
523
+ "winrt._winrt_windows_devices_adc.AdcController",
524
+ sizeof(py::wrapper::Windows::Devices::Adc::AdcController),
525
+ 0,
526
+ Py_TPFLAGS_DEFAULT,
527
+ _type_slots_AdcController
528
+ };
529
+
530
+ static PyGetSetDef getset_AdcController_Static[] = {
531
+ { }
532
+ };
533
+
534
+ static PyMethodDef methods_AdcController_Static[] = {
535
+ { "get_controllers_async", reinterpret_cast<PyCFunction>(AdcController_GetControllersAsync), METH_VARARGS, nullptr },
536
+ { "get_default_async", reinterpret_cast<PyCFunction>(AdcController_GetDefaultAsync), METH_VARARGS, nullptr },
537
+ { }
538
+ };
539
+
540
+ static PyType_Slot type_slots_AdcController_Static[] =
541
+ {
542
+ { Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
543
+ { Py_tp_getset, reinterpret_cast<void*>(getset_AdcController_Static) },
544
+ { Py_tp_methods, reinterpret_cast<void*>(methods_AdcController_Static) },
545
+ { }
546
+ };
547
+
548
+ static PyType_Spec type_spec_AdcController_Static =
549
+ {
550
+ "winrt._winrt_windows_devices_adc.AdcController_Static",
551
+ static_cast<int>(PyType_Type.tp_basicsize),
552
+ static_cast<int>(PyType_Type.tp_itemsize),
553
+ Py_TPFLAGS_DEFAULT,
554
+ type_slots_AdcController_Static
555
+ };
556
+
557
+ // ----- Windows.Devices.Adc Initialization --------------------
558
+ PyDoc_STRVAR(module_doc, "Windows::Devices::Adc");
559
+
560
+
561
+ static PyModuleDef module_def
562
+ = {PyModuleDef_HEAD_INIT,
563
+ "_winrt_windows_devices_adc",
564
+ module_doc,
565
+ 0,
566
+ nullptr,
567
+ nullptr,
568
+ nullptr,
569
+ nullptr,
570
+ nullptr};
571
+
572
+ } // py::cpp::Windows::Devices::Adc
573
+
574
+ PyMODINIT_FUNC PyInit__winrt_windows_devices_adc(void) noexcept
575
+ {
576
+ using namespace py::cpp::Windows::Devices::Adc;
577
+
578
+ if (py::import_winrt_runtime() == -1)
579
+ {
580
+ return nullptr;
581
+ }
582
+
583
+ py::pyobj_handle module{PyModule_Create(&module_def)};
584
+
585
+ if (!module)
586
+ {
587
+ return nullptr;
588
+ }
589
+
590
+ auto object_type = py::get_object_type();
591
+ if (!object_type)
592
+ {
593
+ return nullptr;
594
+ }
595
+
596
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
597
+
598
+ if (!object_bases)
599
+ {
600
+ return nullptr;
601
+ }
602
+
603
+ if (py::register_python_type(module.get(), &type_spec_AdcChannel, object_bases.get(), nullptr) == -1)
604
+ {
605
+ return nullptr;
606
+ }
607
+
608
+ py::pyobj_handle type_AdcController_Static{PyType_FromSpec(&type_spec_AdcController_Static)};
609
+ if (!type_AdcController_Static)
610
+ {
611
+ return nullptr;
612
+ }
613
+
614
+ if (py::register_python_type(module.get(), &type_spec_AdcController, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_AdcController_Static.get())) == -1)
615
+ {
616
+ return nullptr;
617
+ }
618
+
619
+
620
+ return module.detach();
621
+ }
@@ -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.Adc"
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_adc",
10
+ sources=["py.Windows.Devices.Adc.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,52 @@
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.foundation
14
+ import winrt.windows.foundation.collections
15
+
16
+ from winrt.windows.devices.adc import AdcChannelMode
17
+
18
+ Self = typing.TypeVar('Self')
19
+
20
+ class AdcChannel(winrt.system.Object):
21
+ def __enter__(self: Self) -> Self: ...
22
+ def __exit__(self, *args) -> None: ...
23
+ @staticmethod
24
+ def _from(obj: winrt.system.Object, /) -> AdcChannel: ...
25
+ def close(self) -> None: ...
26
+ def read_ratio(self) -> winrt.system.Double: ...
27
+ def read_value(self) -> winrt.system.Int32: ...
28
+ @_property
29
+ def controller(self) -> typing.Optional[AdcController]: ...
30
+
31
+ class AdcController_Static(type):
32
+ def get_controllers_async(cls, provider: typing.Optional[winrt.windows.devices.adc.provider.IAdcProvider], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.foundation.collections.IVectorView[AdcController]]: ...
33
+ def get_default_async(cls) -> winrt.windows.foundation.IAsyncOperation[AdcController]: ...
34
+
35
+ class AdcController(winrt.system.Object, metaclass=AdcController_Static):
36
+ @staticmethod
37
+ def _from(obj: winrt.system.Object, /) -> AdcController: ...
38
+ def is_channel_mode_supported(self, channel_mode: AdcChannelMode, /) -> bool: ...
39
+ def open_channel(self, channel_number: winrt.system.Int32, /) -> typing.Optional[AdcChannel]: ...
40
+ @_property
41
+ def channel_mode(self) -> AdcChannelMode: ...
42
+ @channel_mode.setter
43
+ def channel_mode(self, value: AdcChannelMode) -> None: ...
44
+ @_property
45
+ def channel_count(self) -> winrt.system.Int32: ...
46
+ @_property
47
+ def max_value(self) -> winrt.system.Int32: ...
48
+ @_property
49
+ def min_value(self) -> winrt.system.Int32: ...
50
+ @_property
51
+ def resolution_in_bits(self) -> winrt.system.Int32: ...
52
+
@@ -0,0 +1,19 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import enum
4
+
5
+ import winrt.system
6
+ from winrt import _winrt_windows_devices_adc
7
+
8
+ __all__ = [
9
+ "AdcChannelMode",
10
+ "AdcChannel",
11
+ "AdcController",
12
+ ]
13
+
14
+ class AdcChannelMode(enum.IntEnum):
15
+ SINGLE_ENDED = 0
16
+ DIFFERENTIAL = 1
17
+
18
+ AdcChannel = _winrt_windows_devices_adc.AdcChannel
19
+ AdcController = _winrt_windows_devices_adc.AdcController
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Devices.Adc
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.Adc
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Devices.Adc` namespace.
21
+
22
+ This package provides the `winrt.windows.devices.adc` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.Devices.Adc.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_devices_adc.pyi
9
+ winrt/windows/devices/adc/__init__.py
10
+ winrt_Windows.Devices.Adc.egg-info/PKG-INFO
11
+ winrt_Windows.Devices.Adc.egg-info/SOURCES.txt
12
+ winrt_Windows.Devices.Adc.egg-info/dependency_links.txt
13
+ winrt_Windows.Devices.Adc.egg-info/requires.txt
14
+ winrt_Windows.Devices.Adc.egg-info/top_level.txt
@@ -0,0 +1,6 @@
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.Foundation[all]==2.0.0-beta.1
6
+ winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1