winrt-Windows.System.Power.Diagnostics 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.
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/PKG-INFO +21 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/README.md +7 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/py.Windows.System.Power.Diagnostics.cpp +358 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/pyproject.toml +42 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/pywinrt-version.txt +1 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/requirements.txt +3 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/setup.cfg +4 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/setup.py +17 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt/_winrt_windows_system_power_diagnostics.pyi +34 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt/windows/system/power/diagnostics/__init__.py +12 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt_Windows.System.Power.Diagnostics.egg-info/PKG-INFO +21 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt_Windows.System.Power.Diagnostics.egg-info/SOURCES.txt +13 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt_Windows.System.Power.Diagnostics.egg-info/dependency_links.txt +1 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt_Windows.System.Power.Diagnostics.egg-info/requires.txt +1 -0
- winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt_Windows.System.Power.Diagnostics.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.System.Power.Diagnostics
|
|
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
|
+
|
|
15
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
16
|
+
|
|
17
|
+
# winrt-Windows.System.Power.Diagnostics
|
|
18
|
+
|
|
19
|
+
Windows Runtime (WinRT) APIs for for the `Windows.System.Power.Diagnostics` namespace.
|
|
20
|
+
|
|
21
|
+
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.System.Power.Diagnostics
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for for the `Windows.System.Power.Diagnostics` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
#include "py.Windows.System.Power.Diagnostics.h"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
namespace py::cpp::Windows::System::Power::Diagnostics
|
|
7
|
+
{
|
|
8
|
+
// ----- BackgroundEnergyDiagnostics class --------------------
|
|
9
|
+
|
|
10
|
+
static PyObject* _new_BackgroundEnergyDiagnostics(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
11
|
+
{
|
|
12
|
+
static_assert(py::py_type<winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics>::type_name);
|
|
13
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics>::type_name);
|
|
14
|
+
return nullptr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static PyObject* BackgroundEnergyDiagnostics_ComputeTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
18
|
+
{
|
|
19
|
+
auto arg_count = PyTuple_Size(args);
|
|
20
|
+
|
|
21
|
+
if (arg_count == 0)
|
|
22
|
+
{
|
|
23
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0))
|
|
24
|
+
{
|
|
25
|
+
py::set_arg_count_version_error(0);
|
|
26
|
+
return nullptr;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
try
|
|
30
|
+
{
|
|
31
|
+
return py::convert(winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::ComputeTotalEnergyUsage());
|
|
32
|
+
}
|
|
33
|
+
catch (...)
|
|
34
|
+
{
|
|
35
|
+
py::to_PyErr();
|
|
36
|
+
return nullptr;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else
|
|
40
|
+
{
|
|
41
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
42
|
+
return nullptr;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static PyObject* BackgroundEnergyDiagnostics_ResetTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
47
|
+
{
|
|
48
|
+
auto arg_count = PyTuple_Size(args);
|
|
49
|
+
|
|
50
|
+
if (arg_count == 0)
|
|
51
|
+
{
|
|
52
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0))
|
|
53
|
+
{
|
|
54
|
+
py::set_arg_count_version_error(0);
|
|
55
|
+
return nullptr;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
try
|
|
59
|
+
{
|
|
60
|
+
winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::ResetTotalEnergyUsage();
|
|
61
|
+
Py_RETURN_NONE;
|
|
62
|
+
}
|
|
63
|
+
catch (...)
|
|
64
|
+
{
|
|
65
|
+
py::to_PyErr();
|
|
66
|
+
return nullptr;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else
|
|
70
|
+
{
|
|
71
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
72
|
+
return nullptr;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
static PyObject* BackgroundEnergyDiagnostics_get_DeviceSpecificConversionFactor(PyObject* /*unused*/, void* /*unused*/) noexcept
|
|
77
|
+
{
|
|
78
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.BackgroundEnergyDiagnostics", L"DeviceSpecificConversionFactor"))
|
|
79
|
+
{
|
|
80
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
81
|
+
return nullptr;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
try
|
|
85
|
+
{
|
|
86
|
+
return py::convert(winrt::Windows::System::Power::Diagnostics::BackgroundEnergyDiagnostics::DeviceSpecificConversionFactor());
|
|
87
|
+
}
|
|
88
|
+
catch (...)
|
|
89
|
+
{
|
|
90
|
+
py::to_PyErr();
|
|
91
|
+
return nullptr;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static PyMethodDef _methods_BackgroundEnergyDiagnostics[] = {
|
|
96
|
+
{ }
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
static PyGetSetDef _getset_BackgroundEnergyDiagnostics[] = {
|
|
100
|
+
{ }
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
static PyType_Slot _type_slots_BackgroundEnergyDiagnostics[] =
|
|
104
|
+
{
|
|
105
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_BackgroundEnergyDiagnostics) },
|
|
106
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_BackgroundEnergyDiagnostics) },
|
|
107
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_BackgroundEnergyDiagnostics) },
|
|
108
|
+
{ },
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
static PyType_Spec type_spec_BackgroundEnergyDiagnostics =
|
|
112
|
+
{
|
|
113
|
+
"winrt._winrt_windows_system_power_diagnostics.BackgroundEnergyDiagnostics",
|
|
114
|
+
0,
|
|
115
|
+
0,
|
|
116
|
+
Py_TPFLAGS_DEFAULT,
|
|
117
|
+
_type_slots_BackgroundEnergyDiagnostics
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
static PyGetSetDef getset_BackgroundEnergyDiagnostics_Static[] = {
|
|
121
|
+
{ "device_specific_conversion_factor", reinterpret_cast<getter>(BackgroundEnergyDiagnostics_get_DeviceSpecificConversionFactor), nullptr, nullptr, nullptr },
|
|
122
|
+
{ }
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
static PyMethodDef methods_BackgroundEnergyDiagnostics_Static[] = {
|
|
126
|
+
{ "compute_total_energy_usage", reinterpret_cast<PyCFunction>(BackgroundEnergyDiagnostics_ComputeTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
127
|
+
{ "reset_total_energy_usage", reinterpret_cast<PyCFunction>(BackgroundEnergyDiagnostics_ResetTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
128
|
+
{ }
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
static PyType_Slot type_slots_BackgroundEnergyDiagnostics_Static[] =
|
|
132
|
+
{
|
|
133
|
+
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
134
|
+
{ Py_tp_getset, reinterpret_cast<void*>(getset_BackgroundEnergyDiagnostics_Static) },
|
|
135
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_BackgroundEnergyDiagnostics_Static) },
|
|
136
|
+
{ }
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
static PyType_Spec type_spec_BackgroundEnergyDiagnostics_Static =
|
|
140
|
+
{
|
|
141
|
+
"winrt._winrt_windows_system_power_diagnostics.BackgroundEnergyDiagnostics_Static",
|
|
142
|
+
static_cast<int>(PyType_Type.tp_basicsize),
|
|
143
|
+
static_cast<int>(PyType_Type.tp_itemsize),
|
|
144
|
+
Py_TPFLAGS_DEFAULT,
|
|
145
|
+
type_slots_BackgroundEnergyDiagnostics_Static
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// ----- ForegroundEnergyDiagnostics class --------------------
|
|
149
|
+
|
|
150
|
+
static PyObject* _new_ForegroundEnergyDiagnostics(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
151
|
+
{
|
|
152
|
+
static_assert(py::py_type<winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics>::type_name);
|
|
153
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics>::type_name);
|
|
154
|
+
return nullptr;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
static PyObject* ForegroundEnergyDiagnostics_ComputeTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
158
|
+
{
|
|
159
|
+
auto arg_count = PyTuple_Size(args);
|
|
160
|
+
|
|
161
|
+
if (arg_count == 0)
|
|
162
|
+
{
|
|
163
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ComputeTotalEnergyUsage", 0))
|
|
164
|
+
{
|
|
165
|
+
py::set_arg_count_version_error(0);
|
|
166
|
+
return nullptr;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
try
|
|
170
|
+
{
|
|
171
|
+
return py::convert(winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::ComputeTotalEnergyUsage());
|
|
172
|
+
}
|
|
173
|
+
catch (...)
|
|
174
|
+
{
|
|
175
|
+
py::to_PyErr();
|
|
176
|
+
return nullptr;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
else
|
|
180
|
+
{
|
|
181
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
182
|
+
return nullptr;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static PyObject* ForegroundEnergyDiagnostics_ResetTotalEnergyUsage(PyObject* /*unused*/, PyObject* args) noexcept
|
|
187
|
+
{
|
|
188
|
+
auto arg_count = PyTuple_Size(args);
|
|
189
|
+
|
|
190
|
+
if (arg_count == 0)
|
|
191
|
+
{
|
|
192
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"ResetTotalEnergyUsage", 0))
|
|
193
|
+
{
|
|
194
|
+
py::set_arg_count_version_error(0);
|
|
195
|
+
return nullptr;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
try
|
|
199
|
+
{
|
|
200
|
+
winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::ResetTotalEnergyUsage();
|
|
201
|
+
Py_RETURN_NONE;
|
|
202
|
+
}
|
|
203
|
+
catch (...)
|
|
204
|
+
{
|
|
205
|
+
py::to_PyErr();
|
|
206
|
+
return nullptr;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else
|
|
210
|
+
{
|
|
211
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
212
|
+
return nullptr;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
static PyObject* ForegroundEnergyDiagnostics_get_DeviceSpecificConversionFactor(PyObject* /*unused*/, void* /*unused*/) noexcept
|
|
217
|
+
{
|
|
218
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.Diagnostics.ForegroundEnergyDiagnostics", L"DeviceSpecificConversionFactor"))
|
|
219
|
+
{
|
|
220
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
221
|
+
return nullptr;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
try
|
|
225
|
+
{
|
|
226
|
+
return py::convert(winrt::Windows::System::Power::Diagnostics::ForegroundEnergyDiagnostics::DeviceSpecificConversionFactor());
|
|
227
|
+
}
|
|
228
|
+
catch (...)
|
|
229
|
+
{
|
|
230
|
+
py::to_PyErr();
|
|
231
|
+
return nullptr;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
static PyMethodDef _methods_ForegroundEnergyDiagnostics[] = {
|
|
236
|
+
{ }
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
static PyGetSetDef _getset_ForegroundEnergyDiagnostics[] = {
|
|
240
|
+
{ }
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
static PyType_Slot _type_slots_ForegroundEnergyDiagnostics[] =
|
|
244
|
+
{
|
|
245
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_ForegroundEnergyDiagnostics) },
|
|
246
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ForegroundEnergyDiagnostics) },
|
|
247
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ForegroundEnergyDiagnostics) },
|
|
248
|
+
{ },
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
static PyType_Spec type_spec_ForegroundEnergyDiagnostics =
|
|
252
|
+
{
|
|
253
|
+
"winrt._winrt_windows_system_power_diagnostics.ForegroundEnergyDiagnostics",
|
|
254
|
+
0,
|
|
255
|
+
0,
|
|
256
|
+
Py_TPFLAGS_DEFAULT,
|
|
257
|
+
_type_slots_ForegroundEnergyDiagnostics
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
static PyGetSetDef getset_ForegroundEnergyDiagnostics_Static[] = {
|
|
261
|
+
{ "device_specific_conversion_factor", reinterpret_cast<getter>(ForegroundEnergyDiagnostics_get_DeviceSpecificConversionFactor), nullptr, nullptr, nullptr },
|
|
262
|
+
{ }
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
static PyMethodDef methods_ForegroundEnergyDiagnostics_Static[] = {
|
|
266
|
+
{ "compute_total_energy_usage", reinterpret_cast<PyCFunction>(ForegroundEnergyDiagnostics_ComputeTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
267
|
+
{ "reset_total_energy_usage", reinterpret_cast<PyCFunction>(ForegroundEnergyDiagnostics_ResetTotalEnergyUsage), METH_VARARGS, nullptr },
|
|
268
|
+
{ }
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
static PyType_Slot type_slots_ForegroundEnergyDiagnostics_Static[] =
|
|
272
|
+
{
|
|
273
|
+
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
274
|
+
{ Py_tp_getset, reinterpret_cast<void*>(getset_ForegroundEnergyDiagnostics_Static) },
|
|
275
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_ForegroundEnergyDiagnostics_Static) },
|
|
276
|
+
{ }
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
static PyType_Spec type_spec_ForegroundEnergyDiagnostics_Static =
|
|
280
|
+
{
|
|
281
|
+
"winrt._winrt_windows_system_power_diagnostics.ForegroundEnergyDiagnostics_Static",
|
|
282
|
+
static_cast<int>(PyType_Type.tp_basicsize),
|
|
283
|
+
static_cast<int>(PyType_Type.tp_itemsize),
|
|
284
|
+
Py_TPFLAGS_DEFAULT,
|
|
285
|
+
type_slots_ForegroundEnergyDiagnostics_Static
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
// ----- Windows.System.Power.Diagnostics Initialization --------------------
|
|
289
|
+
PyDoc_STRVAR(module_doc, "Windows::System::Power::Diagnostics");
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
static PyModuleDef module_def
|
|
293
|
+
= {PyModuleDef_HEAD_INIT,
|
|
294
|
+
"_winrt_windows_system_power_diagnostics",
|
|
295
|
+
module_doc,
|
|
296
|
+
0,
|
|
297
|
+
nullptr,
|
|
298
|
+
nullptr,
|
|
299
|
+
nullptr,
|
|
300
|
+
nullptr,
|
|
301
|
+
nullptr};
|
|
302
|
+
|
|
303
|
+
} // py::cpp::Windows::System::Power::Diagnostics
|
|
304
|
+
|
|
305
|
+
PyMODINIT_FUNC PyInit__winrt_windows_system_power_diagnostics(void) noexcept
|
|
306
|
+
{
|
|
307
|
+
using namespace py::cpp::Windows::System::Power::Diagnostics;
|
|
308
|
+
|
|
309
|
+
if (py::import_winrt_runtime() == -1)
|
|
310
|
+
{
|
|
311
|
+
return nullptr;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
315
|
+
|
|
316
|
+
if (!module)
|
|
317
|
+
{
|
|
318
|
+
return nullptr;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
auto object_type = py::get_object_type();
|
|
322
|
+
if (!object_type)
|
|
323
|
+
{
|
|
324
|
+
return nullptr;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
328
|
+
|
|
329
|
+
if (!object_bases)
|
|
330
|
+
{
|
|
331
|
+
return nullptr;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
py::pyobj_handle type_BackgroundEnergyDiagnostics_Static{PyType_FromSpec(&type_spec_BackgroundEnergyDiagnostics_Static)};
|
|
335
|
+
if (!type_BackgroundEnergyDiagnostics_Static)
|
|
336
|
+
{
|
|
337
|
+
return nullptr;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (py::register_python_type(module.get(), &type_spec_BackgroundEnergyDiagnostics, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_BackgroundEnergyDiagnostics_Static.get())) == -1)
|
|
341
|
+
{
|
|
342
|
+
return nullptr;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
py::pyobj_handle type_ForegroundEnergyDiagnostics_Static{PyType_FromSpec(&type_spec_ForegroundEnergyDiagnostics_Static)};
|
|
346
|
+
if (!type_ForegroundEnergyDiagnostics_Static)
|
|
347
|
+
{
|
|
348
|
+
return nullptr;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (py::register_python_type(module.get(), &type_spec_ForegroundEnergyDiagnostics, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ForegroundEnergyDiagnostics_Static.get())) == -1)
|
|
352
|
+
{
|
|
353
|
+
return nullptr;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
return module.detach();
|
|
358
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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.System.Power.Diagnostics"
|
|
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"]
|
|
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
|
+
|
|
31
|
+
[tool.cibuildwheel]
|
|
32
|
+
# use local winrt-sdk build dependency
|
|
33
|
+
environment = { PYTHONPATH="../winrt-sdk/src" }
|
|
34
|
+
# don't install winrt-sdk from PyPI
|
|
35
|
+
build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
36
|
+
# don't build for PyPy
|
|
37
|
+
skip = "pp*"
|
|
38
|
+
# suppress warnings about ARM64 testing
|
|
39
|
+
test-skip = "*-win_arm64"
|
|
40
|
+
|
|
41
|
+
[tool.cibuildwheel.windows]
|
|
42
|
+
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.0.0-beta.1
|
|
@@ -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_system_power_diagnostics",
|
|
10
|
+
sources=["py.Windows.System.Power.Diagnostics.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
|
+
)
|
winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt/_winrt_windows_system_power_diagnostics.pyi
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
|
|
13
|
+
Self = typing.TypeVar('Self')
|
|
14
|
+
|
|
15
|
+
class BackgroundEnergyDiagnostics_Static(type):
|
|
16
|
+
def compute_total_energy_usage(cls) -> winrt.system.UInt64: ...
|
|
17
|
+
def reset_total_energy_usage(cls) -> None: ...
|
|
18
|
+
@_property
|
|
19
|
+
def device_specific_conversion_factor(cls) -> winrt.system.Double: ...
|
|
20
|
+
|
|
21
|
+
class BackgroundEnergyDiagnostics(winrt.system.Object, metaclass=BackgroundEnergyDiagnostics_Static):
|
|
22
|
+
@staticmethod
|
|
23
|
+
def _from(obj: winrt.system.Object, /) -> BackgroundEnergyDiagnostics: ...
|
|
24
|
+
|
|
25
|
+
class ForegroundEnergyDiagnostics_Static(type):
|
|
26
|
+
def compute_total_energy_usage(cls) -> winrt.system.UInt64: ...
|
|
27
|
+
def reset_total_energy_usage(cls) -> None: ...
|
|
28
|
+
@_property
|
|
29
|
+
def device_specific_conversion_factor(cls) -> winrt.system.Double: ...
|
|
30
|
+
|
|
31
|
+
class ForegroundEnergyDiagnostics(winrt.system.Object, metaclass=ForegroundEnergyDiagnostics_Static):
|
|
32
|
+
@staticmethod
|
|
33
|
+
def _from(obj: winrt.system.Object, /) -> ForegroundEnergyDiagnostics: ...
|
|
34
|
+
|
winrt-Windows.System.Power.Diagnostics-2.0.0b1/winrt/windows/system/power/diagnostics/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
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_system_power_diagnostics
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
"BackgroundEnergyDiagnostics",
|
|
8
|
+
"ForegroundEnergyDiagnostics",
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
BackgroundEnergyDiagnostics = _winrt_windows_system_power_diagnostics.BackgroundEnergyDiagnostics
|
|
12
|
+
ForegroundEnergyDiagnostics = _winrt_windows_system_power_diagnostics.ForegroundEnergyDiagnostics
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.System.Power.Diagnostics
|
|
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
|
+
|
|
15
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
16
|
+
|
|
17
|
+
# winrt-Windows.System.Power.Diagnostics
|
|
18
|
+
|
|
19
|
+
Windows Runtime (WinRT) APIs for for the `Windows.System.Power.Diagnostics` namespace.
|
|
20
|
+
|
|
21
|
+
This package provides the `winrt.windows.system.power.diagnostics` module.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
py.Windows.System.Power.Diagnostics.cpp
|
|
3
|
+
pyproject.toml
|
|
4
|
+
pywinrt-version.txt
|
|
5
|
+
requirements.txt
|
|
6
|
+
setup.py
|
|
7
|
+
winrt/_winrt_windows_system_power_diagnostics.pyi
|
|
8
|
+
winrt/windows/system/power/diagnostics/__init__.py
|
|
9
|
+
winrt_Windows.System.Power.Diagnostics.egg-info/PKG-INFO
|
|
10
|
+
winrt_Windows.System.Power.Diagnostics.egg-info/SOURCES.txt
|
|
11
|
+
winrt_Windows.System.Power.Diagnostics.egg-info/dependency_links.txt
|
|
12
|
+
winrt_Windows.System.Power.Diagnostics.egg-info/requires.txt
|
|
13
|
+
winrt_Windows.System.Power.Diagnostics.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
winrt-runtime==2.0.0-beta.1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
winrt
|