winrt-Windows.Devices.Adc.Provider 2.2.0__tar.gz → 3.0.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.
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/PKG-INFO +4 -4
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/all-requirements.txt +2 -2
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/py.Windows.Devices.Adc.Provider.cpp +547 -64
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/pyproject.toml +2 -2
- winrt_windows_devices_adc_provider-3.0.0/pywinrt-version.txt +1 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/requirements.txt +2 -2
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/setup.py +1 -1
- winrt_windows_devices_adc_provider-3.0.0/winrt/_winrt_windows_devices_adc_provider.pyi +67 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/winrt/windows/devices/adc/provider/__init__.py +7 -4
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/winrt_Windows.Devices.Adc.Provider.egg-info/PKG-INFO +4 -4
- winrt_windows_devices_adc_provider-3.0.0/winrt_Windows.Devices.Adc.Provider.egg-info/requires.txt +4 -0
- winrt_windows_devices_adc_provider-2.2.0/pywinrt-version.txt +0 -1
- winrt_windows_devices_adc_provider-2.2.0/winrt/_winrt_windows_devices_adc_provider.pyi +0 -44
- winrt_windows_devices_adc_provider-2.2.0/winrt_Windows.Devices.Adc.Provider.egg-info/requires.txt +0 -4
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/README.md +0 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/setup.cfg +0 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/winrt/windows/devices/adc/provider/py.typed +0 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/winrt_Windows.Devices.Adc.Provider.egg-info/SOURCES.txt +0 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/winrt_Windows.Devices.Adc.Provider.egg-info/dependency_links.txt +0 -0
- {winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/winrt_Windows.Devices.Adc.Provider.egg-info/top_level.txt +0 -0
{winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.Devices.Adc.Provider
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python:
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime==
|
|
15
|
+
Requires-Dist: winrt-runtime==3.0.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation.Collections[all]==
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation.Collections[all]==3.0.0; extra == "all"
|
|
18
18
|
|
|
19
19
|
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
20
20
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
|
|
2
2
|
|
|
3
|
-
winrt-Windows.Foundation.Collections[all]==
|
|
3
|
+
winrt-Windows.Foundation.Collections[all]==3.0.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
|
|
2
2
|
|
|
3
3
|
#include "py.Windows.Devices.Adc.Provider.h"
|
|
4
4
|
|
|
@@ -6,12 +6,14 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
6
6
|
{
|
|
7
7
|
// ----- IAdcControllerProvider interface --------------------
|
|
8
8
|
|
|
9
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
9
10
|
static PyObject* _new_IAdcControllerProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
10
11
|
{
|
|
11
12
|
static_assert(py::py_type<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>::type_name);
|
|
12
13
|
py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>::type_name);
|
|
13
14
|
return nullptr;
|
|
14
15
|
}
|
|
16
|
+
#endif
|
|
15
17
|
|
|
16
18
|
static void _dealloc_IAdcControllerProvider(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider* self) noexcept
|
|
17
19
|
{
|
|
@@ -23,7 +25,7 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
23
25
|
|
|
24
26
|
static PyObject* IAdcControllerProvider_AcquireChannel(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider* self, PyObject* args) noexcept
|
|
25
27
|
{
|
|
26
|
-
auto arg_count =
|
|
28
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
27
29
|
|
|
28
30
|
if (arg_count == 1)
|
|
29
31
|
{
|
|
@@ -44,7 +46,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
44
46
|
|
|
45
47
|
auto param0 = py::convert_to<int32_t>(args, 0);
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
{
|
|
50
|
+
auto _gil = release_gil();
|
|
51
|
+
self->obj.AcquireChannel(param0);
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
Py_RETURN_NONE;
|
|
49
55
|
}
|
|
50
56
|
catch (...)
|
|
@@ -62,7 +68,7 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
62
68
|
|
|
63
69
|
static PyObject* IAdcControllerProvider_IsChannelModeSupported(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider* self, PyObject* args) noexcept
|
|
64
70
|
{
|
|
65
|
-
auto arg_count =
|
|
71
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
66
72
|
|
|
67
73
|
if (arg_count == 1)
|
|
68
74
|
{
|
|
@@ -83,7 +89,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
83
89
|
|
|
84
90
|
auto param0 = py::convert_to<winrt::Windows::Devices::Adc::Provider::ProviderAdcChannelMode>(args, 0);
|
|
85
91
|
|
|
86
|
-
return py::convert(
|
|
92
|
+
return py::convert([&]()
|
|
93
|
+
{
|
|
94
|
+
auto _gil = release_gil();
|
|
95
|
+
return self->obj.IsChannelModeSupported(param0);
|
|
96
|
+
}());
|
|
87
97
|
}
|
|
88
98
|
catch (...)
|
|
89
99
|
{
|
|
@@ -100,7 +110,7 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
100
110
|
|
|
101
111
|
static PyObject* IAdcControllerProvider_ReadValue(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider* self, PyObject* args) noexcept
|
|
102
112
|
{
|
|
103
|
-
auto arg_count =
|
|
113
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
104
114
|
|
|
105
115
|
if (arg_count == 1)
|
|
106
116
|
{
|
|
@@ -121,7 +131,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
121
131
|
|
|
122
132
|
auto param0 = py::convert_to<int32_t>(args, 0);
|
|
123
133
|
|
|
124
|
-
return py::convert(
|
|
134
|
+
return py::convert([&]()
|
|
135
|
+
{
|
|
136
|
+
auto _gil = release_gil();
|
|
137
|
+
return self->obj.ReadValue(param0);
|
|
138
|
+
}());
|
|
125
139
|
}
|
|
126
140
|
catch (...)
|
|
127
141
|
{
|
|
@@ -138,7 +152,7 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
138
152
|
|
|
139
153
|
static PyObject* IAdcControllerProvider_ReleaseChannel(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider* self, PyObject* args) noexcept
|
|
140
154
|
{
|
|
141
|
-
auto arg_count =
|
|
155
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
142
156
|
|
|
143
157
|
if (arg_count == 1)
|
|
144
158
|
{
|
|
@@ -159,7 +173,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
159
173
|
|
|
160
174
|
auto param0 = py::convert_to<int32_t>(args, 0);
|
|
161
175
|
|
|
162
|
-
|
|
176
|
+
{
|
|
177
|
+
auto _gil = release_gil();
|
|
178
|
+
self->obj.ReleaseChannel(param0);
|
|
179
|
+
}
|
|
180
|
+
|
|
163
181
|
Py_RETURN_NONE;
|
|
164
182
|
}
|
|
165
183
|
catch (...)
|
|
@@ -192,7 +210,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
192
210
|
return nullptr;
|
|
193
211
|
}
|
|
194
212
|
|
|
195
|
-
return py::convert(
|
|
213
|
+
return py::convert([&]()
|
|
214
|
+
{
|
|
215
|
+
auto _gil = release_gil();
|
|
216
|
+
return self->obj.ChannelCount();
|
|
217
|
+
}());
|
|
196
218
|
}
|
|
197
219
|
catch (...)
|
|
198
220
|
{
|
|
@@ -218,7 +240,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
218
240
|
return nullptr;
|
|
219
241
|
}
|
|
220
242
|
|
|
221
|
-
return py::convert(
|
|
243
|
+
return py::convert([&]()
|
|
244
|
+
{
|
|
245
|
+
auto _gil = release_gil();
|
|
246
|
+
return self->obj.ChannelMode();
|
|
247
|
+
}());
|
|
222
248
|
}
|
|
223
249
|
catch (...)
|
|
224
250
|
{
|
|
@@ -229,7 +255,7 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
229
255
|
|
|
230
256
|
static int IAdcControllerProvider_put_ChannelMode(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider* self, PyObject* arg, void* /*unused*/) noexcept
|
|
231
257
|
{
|
|
232
|
-
if (arg
|
|
258
|
+
if (!arg)
|
|
233
259
|
{
|
|
234
260
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
235
261
|
return -1;
|
|
@@ -252,7 +278,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
252
278
|
|
|
253
279
|
auto param0 = py::convert_to<winrt::Windows::Devices::Adc::Provider::ProviderAdcChannelMode>(arg);
|
|
254
280
|
|
|
255
|
-
|
|
281
|
+
{
|
|
282
|
+
auto _gil = release_gil();
|
|
283
|
+
self->obj.ChannelMode(param0);
|
|
284
|
+
}
|
|
285
|
+
|
|
256
286
|
return 0;
|
|
257
287
|
}
|
|
258
288
|
catch (...)
|
|
@@ -279,7 +309,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
279
309
|
return nullptr;
|
|
280
310
|
}
|
|
281
311
|
|
|
282
|
-
return py::convert(
|
|
312
|
+
return py::convert([&]()
|
|
313
|
+
{
|
|
314
|
+
auto _gil = release_gil();
|
|
315
|
+
return self->obj.MaxValue();
|
|
316
|
+
}());
|
|
283
317
|
}
|
|
284
318
|
catch (...)
|
|
285
319
|
{
|
|
@@ -305,7 +339,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
305
339
|
return nullptr;
|
|
306
340
|
}
|
|
307
341
|
|
|
308
|
-
return py::convert(
|
|
342
|
+
return py::convert([&]()
|
|
343
|
+
{
|
|
344
|
+
auto _gil = release_gil();
|
|
345
|
+
return self->obj.MinValue();
|
|
346
|
+
}());
|
|
309
347
|
}
|
|
310
348
|
catch (...)
|
|
311
349
|
{
|
|
@@ -331,7 +369,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
331
369
|
return nullptr;
|
|
332
370
|
}
|
|
333
371
|
|
|
334
|
-
return py::convert(
|
|
372
|
+
return py::convert([&]()
|
|
373
|
+
{
|
|
374
|
+
auto _gil = release_gil();
|
|
375
|
+
return self->obj.ResolutionInBits();
|
|
376
|
+
}());
|
|
335
377
|
}
|
|
336
378
|
catch (...)
|
|
337
379
|
{
|
|
@@ -340,6 +382,296 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
340
382
|
}
|
|
341
383
|
}
|
|
342
384
|
|
|
385
|
+
static PyMethodDef _methods_IAdcControllerProvider[] = {
|
|
386
|
+
{ "acquire_channel", reinterpret_cast<PyCFunction>(IAdcControllerProvider_AcquireChannel), METH_VARARGS, nullptr },
|
|
387
|
+
{ "is_channel_mode_supported", reinterpret_cast<PyCFunction>(IAdcControllerProvider_IsChannelModeSupported), METH_VARARGS, nullptr },
|
|
388
|
+
{ "read_value", reinterpret_cast<PyCFunction>(IAdcControllerProvider_ReadValue), METH_VARARGS, nullptr },
|
|
389
|
+
{ "release_channel", reinterpret_cast<PyCFunction>(IAdcControllerProvider_ReleaseChannel), METH_VARARGS, nullptr },
|
|
390
|
+
{ }};
|
|
391
|
+
|
|
392
|
+
static PyGetSetDef _getset_IAdcControllerProvider[] = {
|
|
393
|
+
{ "channel_count", reinterpret_cast<getter>(IAdcControllerProvider_get_ChannelCount), nullptr, nullptr, nullptr },
|
|
394
|
+
{ "channel_mode", reinterpret_cast<getter>(IAdcControllerProvider_get_ChannelMode), reinterpret_cast<setter>(IAdcControllerProvider_put_ChannelMode), nullptr, nullptr },
|
|
395
|
+
{ "max_value", reinterpret_cast<getter>(IAdcControllerProvider_get_MaxValue), nullptr, nullptr, nullptr },
|
|
396
|
+
{ "min_value", reinterpret_cast<getter>(IAdcControllerProvider_get_MinValue), nullptr, nullptr, nullptr },
|
|
397
|
+
{ "resolution_in_bits", reinterpret_cast<getter>(IAdcControllerProvider_get_ResolutionInBits), nullptr, nullptr, nullptr },
|
|
398
|
+
{ }};
|
|
399
|
+
|
|
400
|
+
static PyType_Slot _type_slots_IAdcControllerProvider[] = {
|
|
401
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
402
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_IAdcControllerProvider) },
|
|
403
|
+
#endif
|
|
404
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IAdcControllerProvider) },
|
|
405
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IAdcControllerProvider) },
|
|
406
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IAdcControllerProvider) },
|
|
407
|
+
{ }};
|
|
408
|
+
|
|
409
|
+
static PyType_Spec type_spec_IAdcControllerProvider = {
|
|
410
|
+
"winrt._winrt_windows_devices_adc_provider._IAdcControllerProvider",
|
|
411
|
+
sizeof(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider),
|
|
412
|
+
0,
|
|
413
|
+
Py_TPFLAGS_DEFAULT
|
|
414
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
415
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
416
|
+
#endif
|
|
417
|
+
,
|
|
418
|
+
_type_slots_IAdcControllerProvider};
|
|
419
|
+
|
|
420
|
+
struct ImplementsIAdcControllerProvider : py::ImplementsInterfaceT<ImplementsIAdcControllerProvider, winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>
|
|
421
|
+
{
|
|
422
|
+
ImplementsIAdcControllerProvider() = delete;
|
|
423
|
+
ImplementsIAdcControllerProvider(PyObject* py_obj, winrt::impl::inspectable_abi* runtime_class) : py::ImplementsInterfaceT<ImplementsIAdcControllerProvider, winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>(py_obj, runtime_class)
|
|
424
|
+
{
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
auto AcquireChannel(int32_t param0)
|
|
428
|
+
{
|
|
429
|
+
try
|
|
430
|
+
{
|
|
431
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
432
|
+
|
|
433
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "acquire_channel")};
|
|
434
|
+
if (!method)
|
|
435
|
+
{
|
|
436
|
+
throw python_exception();
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
py::pyobj_handle py_param0{py::convert(param0)};
|
|
440
|
+
if (!py_param0)
|
|
441
|
+
{
|
|
442
|
+
throw python_exception();
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
py::pyobj_handle return_value{PyObject_CallOneArg(method.get(), py_param0.get())};
|
|
446
|
+
if (!return_value)
|
|
447
|
+
{
|
|
448
|
+
throw python_exception();
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
catch (python_exception)
|
|
452
|
+
{
|
|
453
|
+
py::write_unraisable_and_throw();
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
auto IsChannelModeSupported(winrt::Windows::Devices::Adc::Provider::ProviderAdcChannelMode param0)
|
|
458
|
+
{
|
|
459
|
+
try
|
|
460
|
+
{
|
|
461
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
462
|
+
|
|
463
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "is_channel_mode_supported")};
|
|
464
|
+
if (!method)
|
|
465
|
+
{
|
|
466
|
+
throw python_exception();
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
py::pyobj_handle py_param0{py::convert(param0)};
|
|
470
|
+
if (!py_param0)
|
|
471
|
+
{
|
|
472
|
+
throw python_exception();
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
py::pyobj_handle return_value{PyObject_CallOneArg(method.get(), py_param0.get())};
|
|
476
|
+
if (!return_value)
|
|
477
|
+
{
|
|
478
|
+
throw python_exception();
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
return py::convert_to<bool>(return_value.get());
|
|
482
|
+
}
|
|
483
|
+
catch (python_exception)
|
|
484
|
+
{
|
|
485
|
+
py::write_unraisable_and_throw();
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
auto ReadValue(int32_t param0)
|
|
490
|
+
{
|
|
491
|
+
try
|
|
492
|
+
{
|
|
493
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
494
|
+
|
|
495
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "read_value")};
|
|
496
|
+
if (!method)
|
|
497
|
+
{
|
|
498
|
+
throw python_exception();
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
py::pyobj_handle py_param0{py::convert(param0)};
|
|
502
|
+
if (!py_param0)
|
|
503
|
+
{
|
|
504
|
+
throw python_exception();
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
py::pyobj_handle return_value{PyObject_CallOneArg(method.get(), py_param0.get())};
|
|
508
|
+
if (!return_value)
|
|
509
|
+
{
|
|
510
|
+
throw python_exception();
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
return py::convert_to<int32_t>(return_value.get());
|
|
514
|
+
}
|
|
515
|
+
catch (python_exception)
|
|
516
|
+
{
|
|
517
|
+
py::write_unraisable_and_throw();
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
auto ReleaseChannel(int32_t param0)
|
|
522
|
+
{
|
|
523
|
+
try
|
|
524
|
+
{
|
|
525
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
526
|
+
|
|
527
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "release_channel")};
|
|
528
|
+
if (!method)
|
|
529
|
+
{
|
|
530
|
+
throw python_exception();
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
py::pyobj_handle py_param0{py::convert(param0)};
|
|
534
|
+
if (!py_param0)
|
|
535
|
+
{
|
|
536
|
+
throw python_exception();
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
py::pyobj_handle return_value{PyObject_CallOneArg(method.get(), py_param0.get())};
|
|
540
|
+
if (!return_value)
|
|
541
|
+
{
|
|
542
|
+
throw python_exception();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
catch (python_exception)
|
|
546
|
+
{
|
|
547
|
+
py::write_unraisable_and_throw();
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
auto ChannelCount()
|
|
552
|
+
{
|
|
553
|
+
try
|
|
554
|
+
{
|
|
555
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
556
|
+
|
|
557
|
+
py::pyobj_handle value{PyObject_GetAttrString(self.get(), "channel_count")};
|
|
558
|
+
if (!value)
|
|
559
|
+
{
|
|
560
|
+
throw python_exception();
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return py::convert_to<int32_t>(value.get());
|
|
564
|
+
}
|
|
565
|
+
catch (python_exception)
|
|
566
|
+
{
|
|
567
|
+
py::write_unraisable_and_throw();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
auto ChannelMode()
|
|
572
|
+
{
|
|
573
|
+
try
|
|
574
|
+
{
|
|
575
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
576
|
+
|
|
577
|
+
py::pyobj_handle value{PyObject_GetAttrString(self.get(), "channel_mode")};
|
|
578
|
+
if (!value)
|
|
579
|
+
{
|
|
580
|
+
throw python_exception();
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
return py::convert_to<winrt::Windows::Devices::Adc::Provider::ProviderAdcChannelMode>(value.get());
|
|
584
|
+
}
|
|
585
|
+
catch (python_exception)
|
|
586
|
+
{
|
|
587
|
+
py::write_unraisable_and_throw();
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
void ChannelMode(winrt::Windows::Devices::Adc::Provider::ProviderAdcChannelMode param0)
|
|
592
|
+
{
|
|
593
|
+
try
|
|
594
|
+
{
|
|
595
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
596
|
+
|
|
597
|
+
py::pyobj_handle value{py::convert(param0)};
|
|
598
|
+
if (!value)
|
|
599
|
+
{
|
|
600
|
+
throw python_exception();
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
if (PyObject_SetAttrString(self.get(), "channel_mode", value.get()) == -1)
|
|
604
|
+
{
|
|
605
|
+
throw python_exception();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
catch (python_exception)
|
|
609
|
+
{
|
|
610
|
+
py::write_unraisable_and_throw();
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
auto MaxValue()
|
|
615
|
+
{
|
|
616
|
+
try
|
|
617
|
+
{
|
|
618
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
619
|
+
|
|
620
|
+
py::pyobj_handle value{PyObject_GetAttrString(self.get(), "max_value")};
|
|
621
|
+
if (!value)
|
|
622
|
+
{
|
|
623
|
+
throw python_exception();
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
return py::convert_to<int32_t>(value.get());
|
|
627
|
+
}
|
|
628
|
+
catch (python_exception)
|
|
629
|
+
{
|
|
630
|
+
py::write_unraisable_and_throw();
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
auto MinValue()
|
|
635
|
+
{
|
|
636
|
+
try
|
|
637
|
+
{
|
|
638
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
639
|
+
|
|
640
|
+
py::pyobj_handle value{PyObject_GetAttrString(self.get(), "min_value")};
|
|
641
|
+
if (!value)
|
|
642
|
+
{
|
|
643
|
+
throw python_exception();
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
return py::convert_to<int32_t>(value.get());
|
|
647
|
+
}
|
|
648
|
+
catch (python_exception)
|
|
649
|
+
{
|
|
650
|
+
py::write_unraisable_and_throw();
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
auto ResolutionInBits()
|
|
655
|
+
{
|
|
656
|
+
try
|
|
657
|
+
{
|
|
658
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
659
|
+
|
|
660
|
+
py::pyobj_handle value{PyObject_GetAttrString(self.get(), "resolution_in_bits")};
|
|
661
|
+
if (!value)
|
|
662
|
+
{
|
|
663
|
+
throw python_exception();
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
return py::convert_to<int32_t>(value.get());
|
|
667
|
+
}
|
|
668
|
+
catch (python_exception)
|
|
669
|
+
{
|
|
670
|
+
py::write_unraisable_and_throw();
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
};
|
|
674
|
+
|
|
343
675
|
static PyObject* _assign_array_IAdcControllerProvider(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
344
676
|
{
|
|
345
677
|
auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>>();
|
|
@@ -364,48 +696,74 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
364
696
|
}
|
|
365
697
|
}
|
|
366
698
|
|
|
367
|
-
static
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
{
|
|
371
|
-
|
|
699
|
+
static PyObject* _guid_ImplementsIAdcControllerProvider(PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
700
|
+
{
|
|
701
|
+
try
|
|
702
|
+
{
|
|
703
|
+
return py::convert(winrt::guid_of<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>());
|
|
704
|
+
}
|
|
705
|
+
catch (...)
|
|
706
|
+
{
|
|
707
|
+
py::to_PyErr();
|
|
708
|
+
return nullptr;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
static PyObject* _make_ImplementsIAdcControllerProvider(PyObject* /*unused*/, PyObject* args) noexcept
|
|
713
|
+
{
|
|
714
|
+
try
|
|
715
|
+
{
|
|
716
|
+
PyObject* py_obj;
|
|
717
|
+
winrt::impl::inspectable_abi* runtime_class;
|
|
718
|
+
|
|
719
|
+
if (!PyArg_ParseTuple(args, "On", &py_obj, &runtime_class))
|
|
720
|
+
{
|
|
721
|
+
return nullptr;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
auto iface{std::make_unique<ImplementsIAdcControllerProvider>(py_obj, runtime_class)};
|
|
725
|
+
|
|
726
|
+
return PyLong_FromVoidPtr(iface.release());
|
|
727
|
+
}
|
|
728
|
+
catch (...)
|
|
729
|
+
{
|
|
730
|
+
py::to_PyErr();
|
|
731
|
+
return nullptr;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
static PyMethodDef methods_ImplementsIAdcControllerProvider[] = {
|
|
372
736
|
{ "_assign_array_", _assign_array_IAdcControllerProvider, METH_O | METH_STATIC, nullptr },
|
|
373
737
|
{ "_from", reinterpret_cast<PyCFunction>(_from_IAdcControllerProvider), METH_O | METH_STATIC, nullptr },
|
|
374
|
-
{ }
|
|
375
|
-
|
|
738
|
+
{ "_guid_", reinterpret_cast<PyCFunction>(_guid_ImplementsIAdcControllerProvider), METH_NOARGS | METH_STATIC, nullptr },
|
|
739
|
+
{ "_make_", reinterpret_cast<PyCFunction>(_make_ImplementsIAdcControllerProvider), METH_VARARGS | METH_STATIC, nullptr },
|
|
740
|
+
{ }};
|
|
376
741
|
|
|
377
|
-
static
|
|
378
|
-
{
|
|
379
|
-
{
|
|
380
|
-
{ "max_value", reinterpret_cast<getter>(IAdcControllerProvider_get_MaxValue), nullptr, nullptr, nullptr },
|
|
381
|
-
{ "min_value", reinterpret_cast<getter>(IAdcControllerProvider_get_MinValue), nullptr, nullptr, nullptr },
|
|
382
|
-
{ "resolution_in_bits", reinterpret_cast<getter>(IAdcControllerProvider_get_ResolutionInBits), nullptr, nullptr, nullptr },
|
|
383
|
-
{ }
|
|
384
|
-
};
|
|
742
|
+
static PyType_Slot type_slots_ImplementsIAdcControllerProvider[] = {
|
|
743
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_ImplementsIAdcControllerProvider) },
|
|
744
|
+
{ }};
|
|
385
745
|
|
|
386
|
-
static
|
|
387
|
-
{ Py_tp_new, reinterpret_cast<void*>(_new_IAdcControllerProvider) },
|
|
388
|
-
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IAdcControllerProvider) },
|
|
389
|
-
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IAdcControllerProvider) },
|
|
390
|
-
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IAdcControllerProvider) },
|
|
391
|
-
{ }
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
static PyType_Spec type_spec_IAdcControllerProvider = {
|
|
746
|
+
static PyType_Spec type_spec_ImplementsIAdcControllerProvider = {
|
|
395
747
|
"winrt._winrt_windows_devices_adc_provider.IAdcControllerProvider",
|
|
396
|
-
sizeof(py::wrapper::Windows::Devices::Adc::Provider::IAdcControllerProvider),
|
|
397
748
|
0,
|
|
398
|
-
|
|
399
|
-
|
|
749
|
+
0,
|
|
750
|
+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
|
|
751
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
752
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
753
|
+
#endif
|
|
754
|
+
,
|
|
755
|
+
type_slots_ImplementsIAdcControllerProvider};
|
|
400
756
|
|
|
401
757
|
// ----- IAdcProvider interface --------------------
|
|
402
758
|
|
|
759
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
403
760
|
static PyObject* _new_IAdcProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
404
761
|
{
|
|
405
762
|
static_assert(py::py_type<winrt::Windows::Devices::Adc::Provider::IAdcProvider>::type_name);
|
|
406
763
|
py::set_invalid_activation_error(py::py_type<winrt::Windows::Devices::Adc::Provider::IAdcProvider>::type_name);
|
|
407
764
|
return nullptr;
|
|
408
765
|
}
|
|
766
|
+
#endif
|
|
409
767
|
|
|
410
768
|
static void _dealloc_IAdcProvider(py::wrapper::Windows::Devices::Adc::Provider::IAdcProvider* self) noexcept
|
|
411
769
|
{
|
|
@@ -417,7 +775,7 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
417
775
|
|
|
418
776
|
static PyObject* IAdcProvider_GetControllers(py::wrapper::Windows::Devices::Adc::Provider::IAdcProvider* self, PyObject* args) noexcept
|
|
419
777
|
{
|
|
420
|
-
auto arg_count =
|
|
778
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
421
779
|
|
|
422
780
|
if (arg_count == 0)
|
|
423
781
|
{
|
|
@@ -436,7 +794,11 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
436
794
|
return nullptr;
|
|
437
795
|
}
|
|
438
796
|
|
|
439
|
-
return py::convert(
|
|
797
|
+
return py::convert([&]()
|
|
798
|
+
{
|
|
799
|
+
auto _gil = release_gil();
|
|
800
|
+
return self->obj.GetControllers();
|
|
801
|
+
}());
|
|
440
802
|
}
|
|
441
803
|
catch (...)
|
|
442
804
|
{
|
|
@@ -451,6 +813,67 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
451
813
|
}
|
|
452
814
|
}
|
|
453
815
|
|
|
816
|
+
static PyMethodDef _methods_IAdcProvider[] = {
|
|
817
|
+
{ "get_controllers", reinterpret_cast<PyCFunction>(IAdcProvider_GetControllers), METH_VARARGS, nullptr },
|
|
818
|
+
{ }};
|
|
819
|
+
|
|
820
|
+
static PyGetSetDef _getset_IAdcProvider[] = {
|
|
821
|
+
{ }};
|
|
822
|
+
|
|
823
|
+
static PyType_Slot _type_slots_IAdcProvider[] = {
|
|
824
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
825
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_IAdcProvider) },
|
|
826
|
+
#endif
|
|
827
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IAdcProvider) },
|
|
828
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IAdcProvider) },
|
|
829
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IAdcProvider) },
|
|
830
|
+
{ }};
|
|
831
|
+
|
|
832
|
+
static PyType_Spec type_spec_IAdcProvider = {
|
|
833
|
+
"winrt._winrt_windows_devices_adc_provider._IAdcProvider",
|
|
834
|
+
sizeof(py::wrapper::Windows::Devices::Adc::Provider::IAdcProvider),
|
|
835
|
+
0,
|
|
836
|
+
Py_TPFLAGS_DEFAULT
|
|
837
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
838
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
839
|
+
#endif
|
|
840
|
+
,
|
|
841
|
+
_type_slots_IAdcProvider};
|
|
842
|
+
|
|
843
|
+
struct ImplementsIAdcProvider : py::ImplementsInterfaceT<ImplementsIAdcProvider, winrt::Windows::Devices::Adc::Provider::IAdcProvider>
|
|
844
|
+
{
|
|
845
|
+
ImplementsIAdcProvider() = delete;
|
|
846
|
+
ImplementsIAdcProvider(PyObject* py_obj, winrt::impl::inspectable_abi* runtime_class) : py::ImplementsInterfaceT<ImplementsIAdcProvider, winrt::Windows::Devices::Adc::Provider::IAdcProvider>(py_obj, runtime_class)
|
|
847
|
+
{
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
auto GetControllers()
|
|
851
|
+
{
|
|
852
|
+
try
|
|
853
|
+
{
|
|
854
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
855
|
+
|
|
856
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "get_controllers")};
|
|
857
|
+
if (!method)
|
|
858
|
+
{
|
|
859
|
+
throw python_exception();
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
py::pyobj_handle return_value{PyObject_CallNoArgs(method.get())};
|
|
863
|
+
if (!return_value)
|
|
864
|
+
{
|
|
865
|
+
throw python_exception();
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
return py::convert_to<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::Adc::Provider::IAdcControllerProvider>>(return_value.get());
|
|
869
|
+
}
|
|
870
|
+
catch (python_exception)
|
|
871
|
+
{
|
|
872
|
+
py::write_unraisable_and_throw();
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
|
|
454
877
|
static PyObject* _assign_array_IAdcProvider(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
455
878
|
{
|
|
456
879
|
auto array = std::make_unique<py::ComArray<winrt::Windows::Devices::Adc::Provider::IAdcProvider>>();
|
|
@@ -475,31 +898,63 @@ namespace py::cpp::Windows::Devices::Adc::Provider
|
|
|
475
898
|
}
|
|
476
899
|
}
|
|
477
900
|
|
|
478
|
-
static
|
|
479
|
-
|
|
901
|
+
static PyObject* _guid_ImplementsIAdcProvider(PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
902
|
+
{
|
|
903
|
+
try
|
|
904
|
+
{
|
|
905
|
+
return py::convert(winrt::guid_of<winrt::Windows::Devices::Adc::Provider::IAdcProvider>());
|
|
906
|
+
}
|
|
907
|
+
catch (...)
|
|
908
|
+
{
|
|
909
|
+
py::to_PyErr();
|
|
910
|
+
return nullptr;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
static PyObject* _make_ImplementsIAdcProvider(PyObject* /*unused*/, PyObject* args) noexcept
|
|
915
|
+
{
|
|
916
|
+
try
|
|
917
|
+
{
|
|
918
|
+
PyObject* py_obj;
|
|
919
|
+
winrt::impl::inspectable_abi* runtime_class;
|
|
920
|
+
|
|
921
|
+
if (!PyArg_ParseTuple(args, "On", &py_obj, &runtime_class))
|
|
922
|
+
{
|
|
923
|
+
return nullptr;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
auto iface{std::make_unique<ImplementsIAdcProvider>(py_obj, runtime_class)};
|
|
927
|
+
|
|
928
|
+
return PyLong_FromVoidPtr(iface.release());
|
|
929
|
+
}
|
|
930
|
+
catch (...)
|
|
931
|
+
{
|
|
932
|
+
py::to_PyErr();
|
|
933
|
+
return nullptr;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
static PyMethodDef methods_ImplementsIAdcProvider[] = {
|
|
480
938
|
{ "_assign_array_", _assign_array_IAdcProvider, METH_O | METH_STATIC, nullptr },
|
|
481
939
|
{ "_from", reinterpret_cast<PyCFunction>(_from_IAdcProvider), METH_O | METH_STATIC, nullptr },
|
|
482
|
-
{ }
|
|
483
|
-
|
|
940
|
+
{ "_guid_", reinterpret_cast<PyCFunction>(_guid_ImplementsIAdcProvider), METH_NOARGS | METH_STATIC, nullptr },
|
|
941
|
+
{ "_make_", reinterpret_cast<PyCFunction>(_make_ImplementsIAdcProvider), METH_VARARGS | METH_STATIC, nullptr },
|
|
942
|
+
{ }};
|
|
484
943
|
|
|
485
|
-
static
|
|
486
|
-
{ }
|
|
487
|
-
|
|
944
|
+
static PyType_Slot type_slots_ImplementsIAdcProvider[] = {
|
|
945
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_ImplementsIAdcProvider) },
|
|
946
|
+
{ }};
|
|
488
947
|
|
|
489
|
-
static
|
|
490
|
-
{ Py_tp_new, reinterpret_cast<void*>(_new_IAdcProvider) },
|
|
491
|
-
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IAdcProvider) },
|
|
492
|
-
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IAdcProvider) },
|
|
493
|
-
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IAdcProvider) },
|
|
494
|
-
{ }
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
static PyType_Spec type_spec_IAdcProvider = {
|
|
948
|
+
static PyType_Spec type_spec_ImplementsIAdcProvider = {
|
|
498
949
|
"winrt._winrt_windows_devices_adc_provider.IAdcProvider",
|
|
499
|
-
sizeof(py::wrapper::Windows::Devices::Adc::Provider::IAdcProvider),
|
|
500
950
|
0,
|
|
501
|
-
|
|
502
|
-
|
|
951
|
+
0,
|
|
952
|
+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
|
|
953
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
954
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
955
|
+
#endif
|
|
956
|
+
,
|
|
957
|
+
type_slots_ImplementsIAdcProvider};
|
|
503
958
|
|
|
504
959
|
// ----- Windows.Devices.Adc.Provider Initialization --------------------
|
|
505
960
|
|
|
@@ -533,6 +988,12 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices_adc_provider(void) noexcept
|
|
|
533
988
|
return nullptr;
|
|
534
989
|
}
|
|
535
990
|
|
|
991
|
+
auto inspectable_meta_type = py::get_inspectable_meta_type();
|
|
992
|
+
if (!inspectable_meta_type)
|
|
993
|
+
{
|
|
994
|
+
return nullptr;
|
|
995
|
+
}
|
|
996
|
+
|
|
536
997
|
auto object_type = py::get_object_type();
|
|
537
998
|
if (!object_type)
|
|
538
999
|
{
|
|
@@ -552,12 +1013,34 @@ PyMODINIT_FUNC PyInit__winrt_windows_devices_adc_provider(void) noexcept
|
|
|
552
1013
|
return nullptr;
|
|
553
1014
|
}
|
|
554
1015
|
|
|
1016
|
+
py::pytype_handle ImplementsIAdcControllerProvider_type{py::register_python_type(module.get(), &type_spec_ImplementsIAdcControllerProvider, nullptr, inspectable_meta_type)};
|
|
1017
|
+
if (!ImplementsIAdcControllerProvider_type)
|
|
1018
|
+
{
|
|
1019
|
+
return nullptr;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
if (PyModule_AddType(module.get(), ImplementsIAdcControllerProvider_type.get()) == -1)
|
|
1023
|
+
{
|
|
1024
|
+
return nullptr;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
555
1027
|
py::pytype_handle IAdcProvider_type{py::register_python_type(module.get(), &type_spec_IAdcProvider, object_bases.get(), nullptr)};
|
|
556
1028
|
if (!IAdcProvider_type)
|
|
557
1029
|
{
|
|
558
1030
|
return nullptr;
|
|
559
1031
|
}
|
|
560
1032
|
|
|
1033
|
+
py::pytype_handle ImplementsIAdcProvider_type{py::register_python_type(module.get(), &type_spec_ImplementsIAdcProvider, nullptr, inspectable_meta_type)};
|
|
1034
|
+
if (!ImplementsIAdcProvider_type)
|
|
1035
|
+
{
|
|
1036
|
+
return nullptr;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
if (PyModule_AddType(module.get(), ImplementsIAdcProvider_type.get()) == -1)
|
|
1040
|
+
{
|
|
1041
|
+
return nullptr;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
561
1044
|
|
|
562
1045
|
return module.detach();
|
|
563
1046
|
}
|
{winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/pyproject.toml
RENAMED
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
]
|
|
18
18
|
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
19
|
-
requires-python = ">=3.9
|
|
19
|
+
requires-python = ">=3.9"
|
|
20
20
|
|
|
21
21
|
[project.urls]
|
|
22
22
|
# Homepage = "https://github.com/pywinrt/pywinrt"
|
|
@@ -34,7 +34,7 @@ optional-dependencies.all = { file = "all-requirements.txt" }
|
|
|
34
34
|
|
|
35
35
|
[tool.cibuildwheel]
|
|
36
36
|
# use local winrt-sdk build dependency
|
|
37
|
-
environment = { PYTHONPATH="
|
|
37
|
+
environment = { PYTHONPATH="../../winrt-sdk/src" }
|
|
38
38
|
# don't install winrt-sdk from PyPI
|
|
39
39
|
build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
40
40
|
before-build = "uv pip install setuptools"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.0.0
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
|
|
2
2
|
|
|
3
|
-
winrt-runtime==
|
|
3
|
+
winrt-runtime==3.0.0
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
|
|
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
|
+
from abc import abstractmethod
|
|
10
|
+
|
|
11
|
+
import winrt._winrt
|
|
12
|
+
import winrt.system
|
|
13
|
+
import winrt.windows.foundation.collections as windows_foundation_collections
|
|
14
|
+
|
|
15
|
+
from winrt.windows.devices.adc.provider import ProviderAdcChannelMode
|
|
16
|
+
|
|
17
|
+
Self = typing.TypeVar('Self')
|
|
18
|
+
|
|
19
|
+
@typing.final
|
|
20
|
+
class _IAdcControllerProvider: ...
|
|
21
|
+
|
|
22
|
+
class IAdcControllerProvider(winrt._winrt.IInspectable):
|
|
23
|
+
# System.Void Windows.Devices.Adc.Provider.IAdcControllerProvider::AcquireChannel(System.Int32)
|
|
24
|
+
@abstractmethod
|
|
25
|
+
def acquire_channel(self, channel: winrt.system.Int32, /) -> None: ...
|
|
26
|
+
# System.Boolean Windows.Devices.Adc.Provider.IAdcControllerProvider::IsChannelModeSupported(Windows.Devices.Adc.Provider.ProviderAdcChannelMode)
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def is_channel_mode_supported(self, channel_mode: ProviderAdcChannelMode, /) -> bool: ...
|
|
29
|
+
# System.Int32 Windows.Devices.Adc.Provider.IAdcControllerProvider::ReadValue(System.Int32)
|
|
30
|
+
@abstractmethod
|
|
31
|
+
def read_value(self, channel_number: winrt.system.Int32, /) -> winrt.system.Int32: ...
|
|
32
|
+
# System.Void Windows.Devices.Adc.Provider.IAdcControllerProvider::ReleaseChannel(System.Int32)
|
|
33
|
+
@abstractmethod
|
|
34
|
+
def release_channel(self, channel: winrt.system.Int32, /) -> None: ...
|
|
35
|
+
# System.Int32 Windows.Devices.Adc.Provider.IAdcControllerProvider::get_ChannelCount()
|
|
36
|
+
@_property
|
|
37
|
+
@abstractmethod
|
|
38
|
+
def channel_count(self) -> winrt.system.Int32: ...
|
|
39
|
+
# Windows.Devices.Adc.Provider.ProviderAdcChannelMode Windows.Devices.Adc.Provider.IAdcControllerProvider::get_ChannelMode()
|
|
40
|
+
@_property
|
|
41
|
+
@abstractmethod
|
|
42
|
+
def channel_mode(self) -> ProviderAdcChannelMode: ...
|
|
43
|
+
# System.Void Windows.Devices.Adc.Provider.IAdcControllerProvider::put_ChannelMode(Windows.Devices.Adc.Provider.ProviderAdcChannelMode)
|
|
44
|
+
@channel_mode.setter
|
|
45
|
+
@abstractmethod
|
|
46
|
+
def channel_mode(self, value: ProviderAdcChannelMode) -> None: ...
|
|
47
|
+
# System.Int32 Windows.Devices.Adc.Provider.IAdcControllerProvider::get_MaxValue()
|
|
48
|
+
@_property
|
|
49
|
+
@abstractmethod
|
|
50
|
+
def max_value(self) -> winrt.system.Int32: ...
|
|
51
|
+
# System.Int32 Windows.Devices.Adc.Provider.IAdcControllerProvider::get_MinValue()
|
|
52
|
+
@_property
|
|
53
|
+
@abstractmethod
|
|
54
|
+
def min_value(self) -> winrt.system.Int32: ...
|
|
55
|
+
# System.Int32 Windows.Devices.Adc.Provider.IAdcControllerProvider::get_ResolutionInBits()
|
|
56
|
+
@_property
|
|
57
|
+
@abstractmethod
|
|
58
|
+
def resolution_in_bits(self) -> winrt.system.Int32: ...
|
|
59
|
+
|
|
60
|
+
@typing.final
|
|
61
|
+
class _IAdcProvider: ...
|
|
62
|
+
|
|
63
|
+
class IAdcProvider(winrt._winrt.IInspectable):
|
|
64
|
+
# Windows.Foundation.Collections.IVectorView`1<Windows.Devices.Adc.Provider.IAdcControllerProvider> Windows.Devices.Adc.Provider.IAdcProvider::GetControllers()
|
|
65
|
+
@abstractmethod
|
|
66
|
+
def get_controllers(self) -> typing.Sequence[IAdcControllerProvider]: ...
|
|
67
|
+
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.0.0
|
|
2
2
|
|
|
3
3
|
import enum
|
|
4
4
|
|
|
5
5
|
import winrt.system
|
|
6
|
-
from winrt import
|
|
6
|
+
from winrt._winrt_windows_devices_adc_provider import (
|
|
7
|
+
_IAdcControllerProvider,
|
|
8
|
+
IAdcControllerProvider,
|
|
9
|
+
_IAdcProvider,
|
|
10
|
+
IAdcProvider,
|
|
11
|
+
)
|
|
7
12
|
|
|
8
13
|
__all__ = [
|
|
9
14
|
"ProviderAdcChannelMode",
|
|
@@ -15,5 +20,3 @@ class ProviderAdcChannelMode(enum.IntEnum):
|
|
|
15
20
|
SINGLE_ENDED = 0
|
|
16
21
|
DIFFERENTIAL = 1
|
|
17
22
|
|
|
18
|
-
IAdcControllerProvider = _winrt_windows_devices_adc_provider.IAdcControllerProvider
|
|
19
|
-
IAdcProvider = _winrt_windows_devices_adc_provider.IAdcProvider
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.Devices.Adc.Provider
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python:
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime==
|
|
15
|
+
Requires-Dist: winrt-runtime==3.0.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation.Collections[all]==
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation.Collections[all]==3.0.0; extra == "all"
|
|
18
18
|
|
|
19
19
|
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
20
20
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.2.0
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
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.foundation.collections as windows_foundation_collections
|
|
13
|
-
|
|
14
|
-
from winrt.windows.devices.adc.provider import ProviderAdcChannelMode
|
|
15
|
-
|
|
16
|
-
Self = typing.TypeVar('Self')
|
|
17
|
-
|
|
18
|
-
@typing.final
|
|
19
|
-
class IAdcControllerProvider(winrt.system.Object):
|
|
20
|
-
@staticmethod
|
|
21
|
-
def _from(obj: winrt.system.Object, /) -> IAdcControllerProvider: ...
|
|
22
|
-
def acquire_channel(self, channel: winrt.system.Int32, /) -> None: ...
|
|
23
|
-
def is_channel_mode_supported(self, channel_mode: ProviderAdcChannelMode, /) -> bool: ...
|
|
24
|
-
def read_value(self, channel_number: winrt.system.Int32, /) -> winrt.system.Int32: ...
|
|
25
|
-
def release_channel(self, channel: winrt.system.Int32, /) -> None: ...
|
|
26
|
-
@_property
|
|
27
|
-
def channel_count(self) -> winrt.system.Int32: ...
|
|
28
|
-
@_property
|
|
29
|
-
def channel_mode(self) -> ProviderAdcChannelMode: ...
|
|
30
|
-
@channel_mode.setter
|
|
31
|
-
def channel_mode(self, value: ProviderAdcChannelMode) -> None: ...
|
|
32
|
-
@_property
|
|
33
|
-
def max_value(self) -> winrt.system.Int32: ...
|
|
34
|
-
@_property
|
|
35
|
-
def min_value(self) -> winrt.system.Int32: ...
|
|
36
|
-
@_property
|
|
37
|
-
def resolution_in_bits(self) -> winrt.system.Int32: ...
|
|
38
|
-
|
|
39
|
-
@typing.final
|
|
40
|
-
class IAdcProvider(winrt.system.Object):
|
|
41
|
-
@staticmethod
|
|
42
|
-
def _from(obj: winrt.system.Object, /) -> IAdcProvider: ...
|
|
43
|
-
def get_controllers(self) -> typing.Optional[windows_foundation_collections.IVectorView[IAdcControllerProvider]]: ...
|
|
44
|
-
|
{winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/README.md
RENAMED
|
File without changes
|
{winrt_windows_devices_adc_provider-2.2.0 → winrt_windows_devices_adc_provider-3.0.0}/setup.cfg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|