winrt-Windows.System.Power 2.1.0__tar.gz → 2.3.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_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/PKG-INFO +4 -4
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/all-requirements.txt +2 -2
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/py.Windows.System.Power.cpp +303 -41
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/pyproject.toml +3 -2
- winrt_windows_system_power-2.3.0/pywinrt-version.txt +1 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/requirements.txt +2 -2
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt/_winrt_windows_system_power.pyi +1 -1
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt/windows/system/power/__init__.py +1 -1
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt_Windows.System.Power.egg-info/PKG-INFO +4 -4
- winrt_windows_system_power-2.3.0/winrt_Windows.System.Power.egg-info/requires.txt +4 -0
- winrt_windows_system_power-2.1.0/pywinrt-version.txt +0 -1
- winrt_windows_system_power-2.1.0/winrt_Windows.System.Power.egg-info/requires.txt +0 -4
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/README.md +0 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/setup.cfg +0 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/setup.py +0 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt/windows/system/power/py.typed +0 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt_Windows.System.Power.egg-info/SOURCES.txt +0 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt_Windows.System.Power.egg-info/dependency_links.txt +0 -0
- {winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/winrt_Windows.System.Power.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.System.Power
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.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: <3.
|
|
13
|
+
Requires-Python: <3.14,>=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime==2.
|
|
15
|
+
Requires-Dist: winrt-runtime==2.3.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]==2.
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation[all]==2.3.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 v2.
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
|
|
2
2
|
|
|
3
|
-
winrt-Windows.Foundation[all]==2.
|
|
3
|
+
winrt-Windows.Foundation[all]==2.3.0
|
{winrt_windows_system_power-2.1.0 → winrt_windows_system_power-2.3.0}/py.Windows.System.Power.cpp
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
|
|
2
2
|
|
|
3
3
|
#include "py.Windows.System.Power.h"
|
|
4
4
|
|
|
@@ -17,7 +17,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
17
17
|
{
|
|
18
18
|
try
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
static std::optional<bool> is_property_present{};
|
|
21
|
+
|
|
22
|
+
if (!is_property_present.has_value())
|
|
23
|
+
{
|
|
24
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"ExcessiveUsageLevel");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (!is_property_present.value())
|
|
21
28
|
{
|
|
22
29
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
23
30
|
return nullptr;
|
|
@@ -36,7 +43,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
36
43
|
{
|
|
37
44
|
try
|
|
38
45
|
{
|
|
39
|
-
|
|
46
|
+
static std::optional<bool> is_property_present{};
|
|
47
|
+
|
|
48
|
+
if (!is_property_present.has_value())
|
|
49
|
+
{
|
|
50
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"LowUsageLevel");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (!is_property_present.value())
|
|
40
54
|
{
|
|
41
55
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
42
56
|
return nullptr;
|
|
@@ -55,7 +69,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
55
69
|
{
|
|
56
70
|
try
|
|
57
71
|
{
|
|
58
|
-
|
|
72
|
+
static std::optional<bool> is_property_present{};
|
|
73
|
+
|
|
74
|
+
if (!is_property_present.has_value())
|
|
75
|
+
{
|
|
76
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"MaxAcceptableUsageLevel");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!is_property_present.value())
|
|
59
80
|
{
|
|
60
81
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
61
82
|
return nullptr;
|
|
@@ -74,7 +95,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
74
95
|
{
|
|
75
96
|
try
|
|
76
97
|
{
|
|
77
|
-
|
|
98
|
+
static std::optional<bool> is_property_present{};
|
|
99
|
+
|
|
100
|
+
if (!is_property_present.has_value())
|
|
101
|
+
{
|
|
102
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"NearMaxAcceptableUsageLevel");
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!is_property_present.value())
|
|
78
106
|
{
|
|
79
107
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
80
108
|
return nullptr;
|
|
@@ -93,7 +121,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
93
121
|
{
|
|
94
122
|
try
|
|
95
123
|
{
|
|
96
|
-
|
|
124
|
+
static std::optional<bool> is_property_present{};
|
|
125
|
+
|
|
126
|
+
if (!is_property_present.has_value())
|
|
127
|
+
{
|
|
128
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"NearTerminationUsageLevel");
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (!is_property_present.value())
|
|
97
132
|
{
|
|
98
133
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
99
134
|
return nullptr;
|
|
@@ -112,7 +147,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
112
147
|
{
|
|
113
148
|
try
|
|
114
149
|
{
|
|
115
|
-
|
|
150
|
+
static std::optional<bool> is_property_present{};
|
|
151
|
+
|
|
152
|
+
if (!is_property_present.has_value())
|
|
153
|
+
{
|
|
154
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsage");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!is_property_present.value())
|
|
116
158
|
{
|
|
117
159
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
118
160
|
return nullptr;
|
|
@@ -131,7 +173,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
131
173
|
{
|
|
132
174
|
try
|
|
133
175
|
{
|
|
134
|
-
|
|
176
|
+
static std::optional<bool> is_property_present{};
|
|
177
|
+
|
|
178
|
+
if (!is_property_present.has_value())
|
|
179
|
+
{
|
|
180
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageLevel");
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (!is_property_present.value())
|
|
135
184
|
{
|
|
136
185
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
137
186
|
return nullptr;
|
|
@@ -150,7 +199,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
150
199
|
{
|
|
151
200
|
try
|
|
152
201
|
{
|
|
153
|
-
|
|
202
|
+
static std::optional<bool> is_property_present{};
|
|
203
|
+
|
|
204
|
+
if (!is_property_present.has_value())
|
|
205
|
+
{
|
|
206
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"TerminationUsageLevel");
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (!is_property_present.value())
|
|
154
210
|
{
|
|
155
211
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
156
212
|
return nullptr;
|
|
@@ -169,7 +225,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
169
225
|
{
|
|
170
226
|
try
|
|
171
227
|
{
|
|
172
|
-
|
|
228
|
+
static std::optional<bool> is_event_present{};
|
|
229
|
+
|
|
230
|
+
if (!is_event_present.has_value())
|
|
231
|
+
{
|
|
232
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageIncreased");
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (!is_event_present.value())
|
|
173
236
|
{
|
|
174
237
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
175
238
|
return nullptr;
|
|
@@ -190,7 +253,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
190
253
|
{
|
|
191
254
|
try
|
|
192
255
|
{
|
|
193
|
-
|
|
256
|
+
static std::optional<bool> is_event_present{};
|
|
257
|
+
|
|
258
|
+
if (!is_event_present.has_value())
|
|
259
|
+
{
|
|
260
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageIncreased");
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (!is_event_present.value())
|
|
194
264
|
{
|
|
195
265
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
196
266
|
return nullptr;
|
|
@@ -212,7 +282,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
212
282
|
{
|
|
213
283
|
try
|
|
214
284
|
{
|
|
215
|
-
|
|
285
|
+
static std::optional<bool> is_event_present{};
|
|
286
|
+
|
|
287
|
+
if (!is_event_present.has_value())
|
|
288
|
+
{
|
|
289
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageReturnedToLow");
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if (!is_event_present.value())
|
|
216
293
|
{
|
|
217
294
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
218
295
|
return nullptr;
|
|
@@ -233,7 +310,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
233
310
|
{
|
|
234
311
|
try
|
|
235
312
|
{
|
|
236
|
-
|
|
313
|
+
static std::optional<bool> is_event_present{};
|
|
314
|
+
|
|
315
|
+
if (!is_event_present.has_value())
|
|
316
|
+
{
|
|
317
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageReturnedToLow");
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
if (!is_event_present.value())
|
|
237
321
|
{
|
|
238
322
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
239
323
|
return nullptr;
|
|
@@ -323,7 +407,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
323
407
|
{
|
|
324
408
|
try
|
|
325
409
|
{
|
|
326
|
-
|
|
410
|
+
static std::optional<bool> is_property_present{};
|
|
411
|
+
|
|
412
|
+
if (!is_property_present.has_value())
|
|
413
|
+
{
|
|
414
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"ExcessiveUsageLevel");
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (!is_property_present.value())
|
|
327
418
|
{
|
|
328
419
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
329
420
|
return nullptr;
|
|
@@ -342,7 +433,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
342
433
|
{
|
|
343
434
|
try
|
|
344
435
|
{
|
|
345
|
-
|
|
436
|
+
static std::optional<bool> is_property_present{};
|
|
437
|
+
|
|
438
|
+
if (!is_property_present.has_value())
|
|
439
|
+
{
|
|
440
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"LowUsageLevel");
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (!is_property_present.value())
|
|
346
444
|
{
|
|
347
445
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
348
446
|
return nullptr;
|
|
@@ -361,7 +459,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
361
459
|
{
|
|
362
460
|
try
|
|
363
461
|
{
|
|
364
|
-
|
|
462
|
+
static std::optional<bool> is_property_present{};
|
|
463
|
+
|
|
464
|
+
if (!is_property_present.has_value())
|
|
465
|
+
{
|
|
466
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"MaxAcceptableUsageLevel");
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
if (!is_property_present.value())
|
|
365
470
|
{
|
|
366
471
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
367
472
|
return nullptr;
|
|
@@ -380,7 +485,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
380
485
|
{
|
|
381
486
|
try
|
|
382
487
|
{
|
|
383
|
-
|
|
488
|
+
static std::optional<bool> is_property_present{};
|
|
489
|
+
|
|
490
|
+
if (!is_property_present.has_value())
|
|
491
|
+
{
|
|
492
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"NearMaxAcceptableUsageLevel");
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (!is_property_present.value())
|
|
384
496
|
{
|
|
385
497
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
386
498
|
return nullptr;
|
|
@@ -399,7 +511,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
399
511
|
{
|
|
400
512
|
try
|
|
401
513
|
{
|
|
402
|
-
|
|
514
|
+
static std::optional<bool> is_property_present{};
|
|
515
|
+
|
|
516
|
+
if (!is_property_present.has_value())
|
|
517
|
+
{
|
|
518
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsage");
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
if (!is_property_present.value())
|
|
403
522
|
{
|
|
404
523
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
405
524
|
return nullptr;
|
|
@@ -418,7 +537,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
418
537
|
{
|
|
419
538
|
try
|
|
420
539
|
{
|
|
421
|
-
|
|
540
|
+
static std::optional<bool> is_property_present{};
|
|
541
|
+
|
|
542
|
+
if (!is_property_present.has_value())
|
|
543
|
+
{
|
|
544
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageLevel");
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
if (!is_property_present.value())
|
|
422
548
|
{
|
|
423
549
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
424
550
|
return nullptr;
|
|
@@ -437,7 +563,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
437
563
|
{
|
|
438
564
|
try
|
|
439
565
|
{
|
|
440
|
-
|
|
566
|
+
static std::optional<bool> is_event_present{};
|
|
567
|
+
|
|
568
|
+
if (!is_event_present.has_value())
|
|
569
|
+
{
|
|
570
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageIncreased");
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
if (!is_event_present.value())
|
|
441
574
|
{
|
|
442
575
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
443
576
|
return nullptr;
|
|
@@ -458,7 +591,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
458
591
|
{
|
|
459
592
|
try
|
|
460
593
|
{
|
|
461
|
-
|
|
594
|
+
static std::optional<bool> is_event_present{};
|
|
595
|
+
|
|
596
|
+
if (!is_event_present.has_value())
|
|
597
|
+
{
|
|
598
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageIncreased");
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
if (!is_event_present.value())
|
|
462
602
|
{
|
|
463
603
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
464
604
|
return nullptr;
|
|
@@ -480,7 +620,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
480
620
|
{
|
|
481
621
|
try
|
|
482
622
|
{
|
|
483
|
-
|
|
623
|
+
static std::optional<bool> is_event_present{};
|
|
624
|
+
|
|
625
|
+
if (!is_event_present.has_value())
|
|
626
|
+
{
|
|
627
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageReturnedToLow");
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
if (!is_event_present.value())
|
|
484
631
|
{
|
|
485
632
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
486
633
|
return nullptr;
|
|
@@ -501,7 +648,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
501
648
|
{
|
|
502
649
|
try
|
|
503
650
|
{
|
|
504
|
-
|
|
651
|
+
static std::optional<bool> is_event_present{};
|
|
652
|
+
|
|
653
|
+
if (!is_event_present.has_value())
|
|
654
|
+
{
|
|
655
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageReturnedToLow");
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
if (!is_event_present.value())
|
|
505
659
|
{
|
|
506
660
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
507
661
|
return nullptr;
|
|
@@ -589,7 +743,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
589
743
|
{
|
|
590
744
|
try
|
|
591
745
|
{
|
|
592
|
-
|
|
746
|
+
static std::optional<bool> is_property_present{};
|
|
747
|
+
|
|
748
|
+
if (!is_property_present.has_value())
|
|
749
|
+
{
|
|
750
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"BatteryStatus");
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
if (!is_property_present.value())
|
|
593
754
|
{
|
|
594
755
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
595
756
|
return nullptr;
|
|
@@ -608,7 +769,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
608
769
|
{
|
|
609
770
|
try
|
|
610
771
|
{
|
|
611
|
-
|
|
772
|
+
static std::optional<bool> is_property_present{};
|
|
773
|
+
|
|
774
|
+
if (!is_property_present.has_value())
|
|
775
|
+
{
|
|
776
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatus");
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
if (!is_property_present.value())
|
|
612
780
|
{
|
|
613
781
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
614
782
|
return nullptr;
|
|
@@ -627,7 +795,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
627
795
|
{
|
|
628
796
|
try
|
|
629
797
|
{
|
|
630
|
-
|
|
798
|
+
static std::optional<bool> is_property_present{};
|
|
799
|
+
|
|
800
|
+
if (!is_property_present.has_value())
|
|
801
|
+
{
|
|
802
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatus");
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
if (!is_property_present.value())
|
|
631
806
|
{
|
|
632
807
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
633
808
|
return nullptr;
|
|
@@ -646,7 +821,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
646
821
|
{
|
|
647
822
|
try
|
|
648
823
|
{
|
|
649
|
-
|
|
824
|
+
static std::optional<bool> is_property_present{};
|
|
825
|
+
|
|
826
|
+
if (!is_property_present.has_value())
|
|
827
|
+
{
|
|
828
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercent");
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
if (!is_property_present.value())
|
|
650
832
|
{
|
|
651
833
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
652
834
|
return nullptr;
|
|
@@ -665,7 +847,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
665
847
|
{
|
|
666
848
|
try
|
|
667
849
|
{
|
|
668
|
-
|
|
850
|
+
static std::optional<bool> is_property_present{};
|
|
851
|
+
|
|
852
|
+
if (!is_property_present.has_value())
|
|
853
|
+
{
|
|
854
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTime");
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
if (!is_property_present.value())
|
|
669
858
|
{
|
|
670
859
|
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
671
860
|
return nullptr;
|
|
@@ -684,7 +873,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
684
873
|
{
|
|
685
874
|
try
|
|
686
875
|
{
|
|
687
|
-
|
|
876
|
+
static std::optional<bool> is_event_present{};
|
|
877
|
+
|
|
878
|
+
if (!is_event_present.has_value())
|
|
879
|
+
{
|
|
880
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"BatteryStatusChanged");
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
if (!is_event_present.value())
|
|
688
884
|
{
|
|
689
885
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
690
886
|
return nullptr;
|
|
@@ -705,7 +901,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
705
901
|
{
|
|
706
902
|
try
|
|
707
903
|
{
|
|
708
|
-
|
|
904
|
+
static std::optional<bool> is_event_present{};
|
|
905
|
+
|
|
906
|
+
if (!is_event_present.has_value())
|
|
907
|
+
{
|
|
908
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"BatteryStatusChanged");
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
if (!is_event_present.value())
|
|
709
912
|
{
|
|
710
913
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
711
914
|
return nullptr;
|
|
@@ -727,7 +930,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
727
930
|
{
|
|
728
931
|
try
|
|
729
932
|
{
|
|
730
|
-
|
|
933
|
+
static std::optional<bool> is_event_present{};
|
|
934
|
+
|
|
935
|
+
if (!is_event_present.has_value())
|
|
936
|
+
{
|
|
937
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatusChanged");
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
if (!is_event_present.value())
|
|
731
941
|
{
|
|
732
942
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
733
943
|
return nullptr;
|
|
@@ -748,7 +958,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
748
958
|
{
|
|
749
959
|
try
|
|
750
960
|
{
|
|
751
|
-
|
|
961
|
+
static std::optional<bool> is_event_present{};
|
|
962
|
+
|
|
963
|
+
if (!is_event_present.has_value())
|
|
964
|
+
{
|
|
965
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatusChanged");
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
if (!is_event_present.value())
|
|
752
969
|
{
|
|
753
970
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
754
971
|
return nullptr;
|
|
@@ -770,7 +987,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
770
987
|
{
|
|
771
988
|
try
|
|
772
989
|
{
|
|
773
|
-
|
|
990
|
+
static std::optional<bool> is_event_present{};
|
|
991
|
+
|
|
992
|
+
if (!is_event_present.has_value())
|
|
993
|
+
{
|
|
994
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatusChanged");
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
if (!is_event_present.value())
|
|
774
998
|
{
|
|
775
999
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
776
1000
|
return nullptr;
|
|
@@ -791,7 +1015,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
791
1015
|
{
|
|
792
1016
|
try
|
|
793
1017
|
{
|
|
794
|
-
|
|
1018
|
+
static std::optional<bool> is_event_present{};
|
|
1019
|
+
|
|
1020
|
+
if (!is_event_present.has_value())
|
|
1021
|
+
{
|
|
1022
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatusChanged");
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
if (!is_event_present.value())
|
|
795
1026
|
{
|
|
796
1027
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
797
1028
|
return nullptr;
|
|
@@ -813,7 +1044,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
813
1044
|
{
|
|
814
1045
|
try
|
|
815
1046
|
{
|
|
816
|
-
|
|
1047
|
+
static std::optional<bool> is_event_present{};
|
|
1048
|
+
|
|
1049
|
+
if (!is_event_present.has_value())
|
|
1050
|
+
{
|
|
1051
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercentChanged");
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
if (!is_event_present.value())
|
|
817
1055
|
{
|
|
818
1056
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
819
1057
|
return nullptr;
|
|
@@ -834,7 +1072,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
834
1072
|
{
|
|
835
1073
|
try
|
|
836
1074
|
{
|
|
837
|
-
|
|
1075
|
+
static std::optional<bool> is_event_present{};
|
|
1076
|
+
|
|
1077
|
+
if (!is_event_present.has_value())
|
|
1078
|
+
{
|
|
1079
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercentChanged");
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
if (!is_event_present.value())
|
|
838
1083
|
{
|
|
839
1084
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
840
1085
|
return nullptr;
|
|
@@ -856,7 +1101,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
856
1101
|
{
|
|
857
1102
|
try
|
|
858
1103
|
{
|
|
859
|
-
|
|
1104
|
+
static std::optional<bool> is_event_present{};
|
|
1105
|
+
|
|
1106
|
+
if (!is_event_present.has_value())
|
|
1107
|
+
{
|
|
1108
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTimeChanged");
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
if (!is_event_present.value())
|
|
860
1112
|
{
|
|
861
1113
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
862
1114
|
return nullptr;
|
|
@@ -877,7 +1129,14 @@ namespace py::cpp::Windows::System::Power
|
|
|
877
1129
|
{
|
|
878
1130
|
try
|
|
879
1131
|
{
|
|
880
|
-
|
|
1132
|
+
static std::optional<bool> is_event_present{};
|
|
1133
|
+
|
|
1134
|
+
if (!is_event_present.has_value())
|
|
1135
|
+
{
|
|
1136
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTimeChanged");
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
if (!is_event_present.value())
|
|
881
1140
|
{
|
|
882
1141
|
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
883
1142
|
return nullptr;
|
|
@@ -1008,7 +1267,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_power(void) noexcept
|
|
|
1008
1267
|
return nullptr;
|
|
1009
1268
|
}
|
|
1010
1269
|
|
|
1011
|
-
|
|
1270
|
+
py::pytype_handle BackgroundEnergyManager_type{py::register_python_type(module.get(), &type_spec_BackgroundEnergyManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_BackgroundEnergyManager_Static.get()))};
|
|
1271
|
+
if (!BackgroundEnergyManager_type)
|
|
1012
1272
|
{
|
|
1013
1273
|
return nullptr;
|
|
1014
1274
|
}
|
|
@@ -1019,7 +1279,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_power(void) noexcept
|
|
|
1019
1279
|
return nullptr;
|
|
1020
1280
|
}
|
|
1021
1281
|
|
|
1022
|
-
|
|
1282
|
+
py::pytype_handle ForegroundEnergyManager_type{py::register_python_type(module.get(), &type_spec_ForegroundEnergyManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ForegroundEnergyManager_Static.get()))};
|
|
1283
|
+
if (!ForegroundEnergyManager_type)
|
|
1023
1284
|
{
|
|
1024
1285
|
return nullptr;
|
|
1025
1286
|
}
|
|
@@ -1030,7 +1291,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_power(void) noexcept
|
|
|
1030
1291
|
return nullptr;
|
|
1031
1292
|
}
|
|
1032
1293
|
|
|
1033
|
-
|
|
1294
|
+
py::pytype_handle PowerManager_type{py::register_python_type(module.get(), &type_spec_PowerManager, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PowerManager_Static.get()))};
|
|
1295
|
+
if (!PowerManager_type)
|
|
1034
1296
|
{
|
|
1035
1297
|
return nullptr;
|
|
1036
1298
|
}
|
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
]
|
|
18
18
|
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
19
|
-
requires-python = ">=3.9,<3.
|
|
19
|
+
requires-python = ">=3.9,<3.14"
|
|
20
20
|
|
|
21
21
|
[project.urls]
|
|
22
22
|
# Homepage = "https://github.com/pywinrt/pywinrt"
|
|
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
|
|
|
36
36
|
# use local winrt-sdk build dependency
|
|
37
37
|
environment = { PYTHONPATH="../winrt-sdk/src" }
|
|
38
38
|
# don't install winrt-sdk from PyPI
|
|
39
|
-
build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
39
|
+
build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
40
|
+
before-build = "uv pip install setuptools"
|
|
40
41
|
# don't build for PyPy
|
|
41
42
|
skip = "pp*"
|
|
42
43
|
# suppress warnings about ARM64 testing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.3.0
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.3.0
|
|
2
2
|
|
|
3
|
-
winrt-runtime==2.
|
|
3
|
+
winrt-runtime==2.3.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.System.Power
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.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: <3.
|
|
13
|
+
Requires-Python: <3.14,>=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime==2.
|
|
15
|
+
Requires-Dist: winrt-runtime==2.3.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]==2.
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation[all]==2.3.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.1.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|