winrt-Windows.System.Power 2.0.1__tar.gz → 2.1.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.
Files changed (20) hide show
  1. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/PKG-INFO +3 -3
  2. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/all-requirements.txt +2 -2
  3. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/py.Windows.System.Power.cpp +264 -275
  4. winrt_windows_system_power-2.1.0/pywinrt-version.txt +1 -0
  5. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/requirements.txt +2 -2
  6. winrt_windows_system_power-2.1.0/winrt/_winrt_windows_system_power.pyi +94 -0
  7. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/winrt/windows/system/power/__init__.py +1 -1
  8. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/winrt_Windows.System.Power.egg-info/PKG-INFO +3 -3
  9. winrt_windows_system_power-2.1.0/winrt_Windows.System.Power.egg-info/requires.txt +4 -0
  10. winrt_windows_system_power-2.0.1/pywinrt-version.txt +0 -1
  11. winrt_windows_system_power-2.0.1/winrt/_winrt_windows_system_power.pyi +0 -97
  12. winrt_windows_system_power-2.0.1/winrt_Windows.System.Power.egg-info/requires.txt +0 -4
  13. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/README.md +0 -0
  14. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/pyproject.toml +0 -0
  15. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/setup.cfg +0 -0
  16. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/setup.py +0 -0
  17. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/winrt/windows/system/power/py.typed +0 -0
  18. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/winrt_Windows.System.Power.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.0}/winrt_Windows.System.Power.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_system_power-2.0.1 → winrt_windows_system_power-2.1.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.0.1
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,9 +12,9 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.1.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.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.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-Windows.Foundation[all]==2.0.1
3
+ winrt-Windows.Foundation[all]==2.1.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  #include "py.Windows.System.Power.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Power
7
6
  {
8
7
  // ----- BackgroundEnergyManager class --------------------
@@ -16,14 +15,14 @@ namespace py::cpp::Windows::System::Power
16
15
 
17
16
  static PyObject* BackgroundEnergyManager_get_ExcessiveUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
18
17
  {
19
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"ExcessiveUsageLevel"))
20
- {
21
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
22
- return nullptr;
23
- }
24
-
25
18
  try
26
19
  {
20
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"ExcessiveUsageLevel"))
21
+ {
22
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
23
+ return nullptr;
24
+ }
25
+
27
26
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::ExcessiveUsageLevel());
28
27
  }
29
28
  catch (...)
@@ -35,14 +34,14 @@ namespace py::cpp::Windows::System::Power
35
34
 
36
35
  static PyObject* BackgroundEnergyManager_get_LowUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
37
36
  {
38
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"LowUsageLevel"))
39
- {
40
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
41
- return nullptr;
42
- }
43
-
44
37
  try
45
38
  {
39
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"LowUsageLevel"))
40
+ {
41
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
42
+ return nullptr;
43
+ }
44
+
46
45
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::LowUsageLevel());
47
46
  }
48
47
  catch (...)
@@ -54,14 +53,14 @@ namespace py::cpp::Windows::System::Power
54
53
 
55
54
  static PyObject* BackgroundEnergyManager_get_MaxAcceptableUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
56
55
  {
57
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"MaxAcceptableUsageLevel"))
58
- {
59
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
60
- return nullptr;
61
- }
62
-
63
56
  try
64
57
  {
58
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"MaxAcceptableUsageLevel"))
59
+ {
60
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
61
+ return nullptr;
62
+ }
63
+
65
64
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::MaxAcceptableUsageLevel());
66
65
  }
67
66
  catch (...)
@@ -73,14 +72,14 @@ namespace py::cpp::Windows::System::Power
73
72
 
74
73
  static PyObject* BackgroundEnergyManager_get_NearMaxAcceptableUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
75
74
  {
76
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"NearMaxAcceptableUsageLevel"))
77
- {
78
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
79
- return nullptr;
80
- }
81
-
82
75
  try
83
76
  {
77
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"NearMaxAcceptableUsageLevel"))
78
+ {
79
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
80
+ return nullptr;
81
+ }
82
+
84
83
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::NearMaxAcceptableUsageLevel());
85
84
  }
86
85
  catch (...)
@@ -92,14 +91,14 @@ namespace py::cpp::Windows::System::Power
92
91
 
93
92
  static PyObject* BackgroundEnergyManager_get_NearTerminationUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
94
93
  {
95
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"NearTerminationUsageLevel"))
96
- {
97
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
98
- return nullptr;
99
- }
100
-
101
94
  try
102
95
  {
96
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"NearTerminationUsageLevel"))
97
+ {
98
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
99
+ return nullptr;
100
+ }
101
+
103
102
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::NearTerminationUsageLevel());
104
103
  }
105
104
  catch (...)
@@ -111,14 +110,14 @@ namespace py::cpp::Windows::System::Power
111
110
 
112
111
  static PyObject* BackgroundEnergyManager_get_RecentEnergyUsage(PyObject* /*unused*/, void* /*unused*/) noexcept
113
112
  {
114
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsage"))
115
- {
116
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
117
- return nullptr;
118
- }
119
-
120
113
  try
121
114
  {
115
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsage"))
116
+ {
117
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
118
+ return nullptr;
119
+ }
120
+
122
121
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::RecentEnergyUsage());
123
122
  }
124
123
  catch (...)
@@ -130,14 +129,14 @@ namespace py::cpp::Windows::System::Power
130
129
 
131
130
  static PyObject* BackgroundEnergyManager_get_RecentEnergyUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
132
131
  {
133
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageLevel"))
134
- {
135
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
136
- return nullptr;
137
- }
138
-
139
132
  try
140
133
  {
134
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageLevel"))
135
+ {
136
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
137
+ return nullptr;
138
+ }
139
+
141
140
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::RecentEnergyUsageLevel());
142
141
  }
143
142
  catch (...)
@@ -149,14 +148,14 @@ namespace py::cpp::Windows::System::Power
149
148
 
150
149
  static PyObject* BackgroundEnergyManager_get_TerminationUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
151
150
  {
152
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"TerminationUsageLevel"))
153
- {
154
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
155
- return nullptr;
156
- }
157
-
158
151
  try
159
152
  {
153
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.BackgroundEnergyManager", L"TerminationUsageLevel"))
154
+ {
155
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
156
+ return nullptr;
157
+ }
158
+
160
159
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::TerminationUsageLevel());
161
160
  }
162
161
  catch (...)
@@ -168,14 +167,14 @@ namespace py::cpp::Windows::System::Power
168
167
 
169
168
  static PyObject* BackgroundEnergyManager_add_RecentEnergyUsageIncreased(PyObject* /*unused*/, PyObject* arg) noexcept
170
169
  {
171
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageIncreased"))
172
- {
173
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
174
- return nullptr;
175
- }
176
-
177
170
  try
178
171
  {
172
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageIncreased"))
173
+ {
174
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
175
+ return nullptr;
176
+ }
177
+
179
178
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
180
179
 
181
180
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::RecentEnergyUsageIncreased(param0));
@@ -189,14 +188,14 @@ namespace py::cpp::Windows::System::Power
189
188
 
190
189
  static PyObject* BackgroundEnergyManager_remove_RecentEnergyUsageIncreased(PyObject* /*unused*/, PyObject* arg) noexcept
191
190
  {
192
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageIncreased"))
193
- {
194
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
195
- return nullptr;
196
- }
197
-
198
191
  try
199
192
  {
193
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageIncreased"))
194
+ {
195
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
196
+ return nullptr;
197
+ }
198
+
200
199
  auto param0 = py::convert_to<winrt::event_token>(arg);
201
200
 
202
201
  winrt::Windows::System::Power::BackgroundEnergyManager::RecentEnergyUsageIncreased(param0);
@@ -211,14 +210,14 @@ namespace py::cpp::Windows::System::Power
211
210
 
212
211
  static PyObject* BackgroundEnergyManager_add_RecentEnergyUsageReturnedToLow(PyObject* /*unused*/, PyObject* arg) noexcept
213
212
  {
214
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
215
- {
216
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
217
- return nullptr;
218
- }
219
-
220
213
  try
221
214
  {
215
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
216
+ {
217
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
218
+ return nullptr;
219
+ }
220
+
222
221
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
223
222
 
224
223
  return py::convert(winrt::Windows::System::Power::BackgroundEnergyManager::RecentEnergyUsageReturnedToLow(param0));
@@ -232,14 +231,14 @@ namespace py::cpp::Windows::System::Power
232
231
 
233
232
  static PyObject* BackgroundEnergyManager_remove_RecentEnergyUsageReturnedToLow(PyObject* /*unused*/, PyObject* arg) noexcept
234
233
  {
235
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
236
- {
237
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
238
- return nullptr;
239
- }
240
-
241
234
  try
242
235
  {
236
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.BackgroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
237
+ {
238
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
239
+ return nullptr;
240
+ }
241
+
243
242
  auto param0 = py::convert_to<winrt::event_token>(arg);
244
243
 
245
244
  winrt::Windows::System::Power::BackgroundEnergyManager::RecentEnergyUsageReturnedToLow(param0);
@@ -253,10 +252,6 @@ namespace py::cpp::Windows::System::Power
253
252
  }
254
253
 
255
254
  static PyMethodDef _methods_BackgroundEnergyManager[] = {
256
- { "add_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_add_RecentEnergyUsageIncreased), METH_O | METH_STATIC, nullptr },
257
- { "remove_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_remove_RecentEnergyUsageIncreased), METH_O | METH_STATIC, nullptr },
258
- { "add_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_add_RecentEnergyUsageReturnedToLow), METH_O | METH_STATIC, nullptr },
259
- { "remove_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_remove_RecentEnergyUsageReturnedToLow), METH_O | METH_STATIC, nullptr },
260
255
  { }
261
256
  };
262
257
 
@@ -264,22 +259,19 @@ namespace py::cpp::Windows::System::Power
264
259
  { }
265
260
  };
266
261
 
267
- static PyType_Slot _type_slots_BackgroundEnergyManager[] =
268
- {
262
+ static PyType_Slot _type_slots_BackgroundEnergyManager[] = {
269
263
  { Py_tp_new, reinterpret_cast<void*>(_new_BackgroundEnergyManager) },
270
264
  { Py_tp_methods, reinterpret_cast<void*>(_methods_BackgroundEnergyManager) },
271
265
  { Py_tp_getset, reinterpret_cast<void*>(_getset_BackgroundEnergyManager) },
272
- { },
266
+ { }
273
267
  };
274
268
 
275
- static PyType_Spec type_spec_BackgroundEnergyManager =
276
- {
269
+ static PyType_Spec type_spec_BackgroundEnergyManager = {
277
270
  "winrt._winrt_windows_system_power.BackgroundEnergyManager",
278
271
  0,
279
272
  0,
280
273
  Py_TPFLAGS_DEFAULT,
281
- _type_slots_BackgroundEnergyManager
282
- };
274
+ _type_slots_BackgroundEnergyManager};
283
275
 
284
276
  static PyGetSetDef getset_BackgroundEnergyManager_Static[] = {
285
277
  { "excessive_usage_level", reinterpret_cast<getter>(BackgroundEnergyManager_get_ExcessiveUsageLevel), nullptr, nullptr, nullptr },
@@ -294,6 +286,10 @@ namespace py::cpp::Windows::System::Power
294
286
  };
295
287
 
296
288
  static PyMethodDef methods_BackgroundEnergyManager_Static[] = {
289
+ { "add_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_add_RecentEnergyUsageIncreased), METH_O, nullptr },
290
+ { "remove_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_remove_RecentEnergyUsageIncreased), METH_O, nullptr },
291
+ { "add_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_add_RecentEnergyUsageReturnedToLow), METH_O, nullptr },
292
+ { "remove_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(BackgroundEnergyManager_remove_RecentEnergyUsageReturnedToLow), METH_O, nullptr },
297
293
  { }
298
294
  };
299
295
 
@@ -325,14 +321,14 @@ namespace py::cpp::Windows::System::Power
325
321
 
326
322
  static PyObject* ForegroundEnergyManager_get_ExcessiveUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
327
323
  {
328
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"ExcessiveUsageLevel"))
329
- {
330
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
331
- return nullptr;
332
- }
333
-
334
324
  try
335
325
  {
326
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"ExcessiveUsageLevel"))
327
+ {
328
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
329
+ return nullptr;
330
+ }
331
+
336
332
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::ExcessiveUsageLevel());
337
333
  }
338
334
  catch (...)
@@ -344,14 +340,14 @@ namespace py::cpp::Windows::System::Power
344
340
 
345
341
  static PyObject* ForegroundEnergyManager_get_LowUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
346
342
  {
347
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"LowUsageLevel"))
348
- {
349
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
350
- return nullptr;
351
- }
352
-
353
343
  try
354
344
  {
345
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"LowUsageLevel"))
346
+ {
347
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
348
+ return nullptr;
349
+ }
350
+
355
351
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::LowUsageLevel());
356
352
  }
357
353
  catch (...)
@@ -363,14 +359,14 @@ namespace py::cpp::Windows::System::Power
363
359
 
364
360
  static PyObject* ForegroundEnergyManager_get_MaxAcceptableUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
365
361
  {
366
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"MaxAcceptableUsageLevel"))
367
- {
368
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
369
- return nullptr;
370
- }
371
-
372
362
  try
373
363
  {
364
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"MaxAcceptableUsageLevel"))
365
+ {
366
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
367
+ return nullptr;
368
+ }
369
+
374
370
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::MaxAcceptableUsageLevel());
375
371
  }
376
372
  catch (...)
@@ -382,14 +378,14 @@ namespace py::cpp::Windows::System::Power
382
378
 
383
379
  static PyObject* ForegroundEnergyManager_get_NearMaxAcceptableUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
384
380
  {
385
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"NearMaxAcceptableUsageLevel"))
386
- {
387
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
388
- return nullptr;
389
- }
390
-
391
381
  try
392
382
  {
383
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"NearMaxAcceptableUsageLevel"))
384
+ {
385
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
386
+ return nullptr;
387
+ }
388
+
393
389
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::NearMaxAcceptableUsageLevel());
394
390
  }
395
391
  catch (...)
@@ -401,14 +397,14 @@ namespace py::cpp::Windows::System::Power
401
397
 
402
398
  static PyObject* ForegroundEnergyManager_get_RecentEnergyUsage(PyObject* /*unused*/, void* /*unused*/) noexcept
403
399
  {
404
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsage"))
405
- {
406
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
407
- return nullptr;
408
- }
409
-
410
400
  try
411
401
  {
402
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsage"))
403
+ {
404
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
405
+ return nullptr;
406
+ }
407
+
412
408
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::RecentEnergyUsage());
413
409
  }
414
410
  catch (...)
@@ -420,14 +416,14 @@ namespace py::cpp::Windows::System::Power
420
416
 
421
417
  static PyObject* ForegroundEnergyManager_get_RecentEnergyUsageLevel(PyObject* /*unused*/, void* /*unused*/) noexcept
422
418
  {
423
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageLevel"))
424
- {
425
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
426
- return nullptr;
427
- }
428
-
429
419
  try
430
420
  {
421
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageLevel"))
422
+ {
423
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
424
+ return nullptr;
425
+ }
426
+
431
427
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::RecentEnergyUsageLevel());
432
428
  }
433
429
  catch (...)
@@ -439,14 +435,14 @@ namespace py::cpp::Windows::System::Power
439
435
 
440
436
  static PyObject* ForegroundEnergyManager_add_RecentEnergyUsageIncreased(PyObject* /*unused*/, PyObject* arg) noexcept
441
437
  {
442
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageIncreased"))
443
- {
444
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
445
- return nullptr;
446
- }
447
-
448
438
  try
449
439
  {
440
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageIncreased"))
441
+ {
442
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
443
+ return nullptr;
444
+ }
445
+
450
446
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
451
447
 
452
448
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::RecentEnergyUsageIncreased(param0));
@@ -460,14 +456,14 @@ namespace py::cpp::Windows::System::Power
460
456
 
461
457
  static PyObject* ForegroundEnergyManager_remove_RecentEnergyUsageIncreased(PyObject* /*unused*/, PyObject* arg) noexcept
462
458
  {
463
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageIncreased"))
464
- {
465
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
466
- return nullptr;
467
- }
468
-
469
459
  try
470
460
  {
461
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageIncreased"))
462
+ {
463
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
464
+ return nullptr;
465
+ }
466
+
471
467
  auto param0 = py::convert_to<winrt::event_token>(arg);
472
468
 
473
469
  winrt::Windows::System::Power::ForegroundEnergyManager::RecentEnergyUsageIncreased(param0);
@@ -482,14 +478,14 @@ namespace py::cpp::Windows::System::Power
482
478
 
483
479
  static PyObject* ForegroundEnergyManager_add_RecentEnergyUsageReturnedToLow(PyObject* /*unused*/, PyObject* arg) noexcept
484
480
  {
485
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
486
- {
487
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
488
- return nullptr;
489
- }
490
-
491
481
  try
492
482
  {
483
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
484
+ {
485
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
486
+ return nullptr;
487
+ }
488
+
493
489
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
494
490
 
495
491
  return py::convert(winrt::Windows::System::Power::ForegroundEnergyManager::RecentEnergyUsageReturnedToLow(param0));
@@ -503,14 +499,14 @@ namespace py::cpp::Windows::System::Power
503
499
 
504
500
  static PyObject* ForegroundEnergyManager_remove_RecentEnergyUsageReturnedToLow(PyObject* /*unused*/, PyObject* arg) noexcept
505
501
  {
506
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
507
- {
508
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
509
- return nullptr;
510
- }
511
-
512
502
  try
513
503
  {
504
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.ForegroundEnergyManager", L"RecentEnergyUsageReturnedToLow"))
505
+ {
506
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
507
+ return nullptr;
508
+ }
509
+
514
510
  auto param0 = py::convert_to<winrt::event_token>(arg);
515
511
 
516
512
  winrt::Windows::System::Power::ForegroundEnergyManager::RecentEnergyUsageReturnedToLow(param0);
@@ -524,10 +520,6 @@ namespace py::cpp::Windows::System::Power
524
520
  }
525
521
 
526
522
  static PyMethodDef _methods_ForegroundEnergyManager[] = {
527
- { "add_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_add_RecentEnergyUsageIncreased), METH_O | METH_STATIC, nullptr },
528
- { "remove_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_remove_RecentEnergyUsageIncreased), METH_O | METH_STATIC, nullptr },
529
- { "add_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_add_RecentEnergyUsageReturnedToLow), METH_O | METH_STATIC, nullptr },
530
- { "remove_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_remove_RecentEnergyUsageReturnedToLow), METH_O | METH_STATIC, nullptr },
531
523
  { }
532
524
  };
533
525
 
@@ -535,22 +527,19 @@ namespace py::cpp::Windows::System::Power
535
527
  { }
536
528
  };
537
529
 
538
- static PyType_Slot _type_slots_ForegroundEnergyManager[] =
539
- {
530
+ static PyType_Slot _type_slots_ForegroundEnergyManager[] = {
540
531
  { Py_tp_new, reinterpret_cast<void*>(_new_ForegroundEnergyManager) },
541
532
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ForegroundEnergyManager) },
542
533
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ForegroundEnergyManager) },
543
- { },
534
+ { }
544
535
  };
545
536
 
546
- static PyType_Spec type_spec_ForegroundEnergyManager =
547
- {
537
+ static PyType_Spec type_spec_ForegroundEnergyManager = {
548
538
  "winrt._winrt_windows_system_power.ForegroundEnergyManager",
549
539
  0,
550
540
  0,
551
541
  Py_TPFLAGS_DEFAULT,
552
- _type_slots_ForegroundEnergyManager
553
- };
542
+ _type_slots_ForegroundEnergyManager};
554
543
 
555
544
  static PyGetSetDef getset_ForegroundEnergyManager_Static[] = {
556
545
  { "excessive_usage_level", reinterpret_cast<getter>(ForegroundEnergyManager_get_ExcessiveUsageLevel), nullptr, nullptr, nullptr },
@@ -563,6 +552,10 @@ namespace py::cpp::Windows::System::Power
563
552
  };
564
553
 
565
554
  static PyMethodDef methods_ForegroundEnergyManager_Static[] = {
555
+ { "add_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_add_RecentEnergyUsageIncreased), METH_O, nullptr },
556
+ { "remove_recent_energy_usage_increased", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_remove_RecentEnergyUsageIncreased), METH_O, nullptr },
557
+ { "add_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_add_RecentEnergyUsageReturnedToLow), METH_O, nullptr },
558
+ { "remove_recent_energy_usage_returned_to_low", reinterpret_cast<PyCFunction>(ForegroundEnergyManager_remove_RecentEnergyUsageReturnedToLow), METH_O, nullptr },
566
559
  { }
567
560
  };
568
561
 
@@ -594,14 +587,14 @@ namespace py::cpp::Windows::System::Power
594
587
 
595
588
  static PyObject* PowerManager_get_BatteryStatus(PyObject* /*unused*/, void* /*unused*/) noexcept
596
589
  {
597
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"BatteryStatus"))
598
- {
599
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
600
- return nullptr;
601
- }
602
-
603
590
  try
604
591
  {
592
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"BatteryStatus"))
593
+ {
594
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
595
+ return nullptr;
596
+ }
597
+
605
598
  return py::convert(winrt::Windows::System::Power::PowerManager::BatteryStatus());
606
599
  }
607
600
  catch (...)
@@ -613,14 +606,14 @@ namespace py::cpp::Windows::System::Power
613
606
 
614
607
  static PyObject* PowerManager_get_EnergySaverStatus(PyObject* /*unused*/, void* /*unused*/) noexcept
615
608
  {
616
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatus"))
617
- {
618
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
619
- return nullptr;
620
- }
621
-
622
609
  try
623
610
  {
611
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatus"))
612
+ {
613
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
614
+ return nullptr;
615
+ }
616
+
624
617
  return py::convert(winrt::Windows::System::Power::PowerManager::EnergySaverStatus());
625
618
  }
626
619
  catch (...)
@@ -632,14 +625,14 @@ namespace py::cpp::Windows::System::Power
632
625
 
633
626
  static PyObject* PowerManager_get_PowerSupplyStatus(PyObject* /*unused*/, void* /*unused*/) noexcept
634
627
  {
635
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatus"))
636
- {
637
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
638
- return nullptr;
639
- }
640
-
641
628
  try
642
629
  {
630
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatus"))
631
+ {
632
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
633
+ return nullptr;
634
+ }
635
+
643
636
  return py::convert(winrt::Windows::System::Power::PowerManager::PowerSupplyStatus());
644
637
  }
645
638
  catch (...)
@@ -651,14 +644,14 @@ namespace py::cpp::Windows::System::Power
651
644
 
652
645
  static PyObject* PowerManager_get_RemainingChargePercent(PyObject* /*unused*/, void* /*unused*/) noexcept
653
646
  {
654
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercent"))
655
- {
656
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
657
- return nullptr;
658
- }
659
-
660
647
  try
661
648
  {
649
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercent"))
650
+ {
651
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
652
+ return nullptr;
653
+ }
654
+
662
655
  return py::convert(winrt::Windows::System::Power::PowerManager::RemainingChargePercent());
663
656
  }
664
657
  catch (...)
@@ -670,14 +663,14 @@ namespace py::cpp::Windows::System::Power
670
663
 
671
664
  static PyObject* PowerManager_get_RemainingDischargeTime(PyObject* /*unused*/, void* /*unused*/) noexcept
672
665
  {
673
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTime"))
674
- {
675
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
676
- return nullptr;
677
- }
678
-
679
666
  try
680
667
  {
668
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTime"))
669
+ {
670
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
671
+ return nullptr;
672
+ }
673
+
681
674
  return py::convert(winrt::Windows::System::Power::PowerManager::RemainingDischargeTime());
682
675
  }
683
676
  catch (...)
@@ -689,14 +682,14 @@ namespace py::cpp::Windows::System::Power
689
682
 
690
683
  static PyObject* PowerManager_add_BatteryStatusChanged(PyObject* /*unused*/, PyObject* arg) noexcept
691
684
  {
692
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"BatteryStatusChanged"))
693
- {
694
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
695
- return nullptr;
696
- }
697
-
698
685
  try
699
686
  {
687
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"BatteryStatusChanged"))
688
+ {
689
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
690
+ return nullptr;
691
+ }
692
+
700
693
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
701
694
 
702
695
  return py::convert(winrt::Windows::System::Power::PowerManager::BatteryStatusChanged(param0));
@@ -710,14 +703,14 @@ namespace py::cpp::Windows::System::Power
710
703
 
711
704
  static PyObject* PowerManager_remove_BatteryStatusChanged(PyObject* /*unused*/, PyObject* arg) noexcept
712
705
  {
713
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"BatteryStatusChanged"))
714
- {
715
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
716
- return nullptr;
717
- }
718
-
719
706
  try
720
707
  {
708
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"BatteryStatusChanged"))
709
+ {
710
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
711
+ return nullptr;
712
+ }
713
+
721
714
  auto param0 = py::convert_to<winrt::event_token>(arg);
722
715
 
723
716
  winrt::Windows::System::Power::PowerManager::BatteryStatusChanged(param0);
@@ -732,14 +725,14 @@ namespace py::cpp::Windows::System::Power
732
725
 
733
726
  static PyObject* PowerManager_add_EnergySaverStatusChanged(PyObject* /*unused*/, PyObject* arg) noexcept
734
727
  {
735
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatusChanged"))
736
- {
737
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
738
- return nullptr;
739
- }
740
-
741
728
  try
742
729
  {
730
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatusChanged"))
731
+ {
732
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
733
+ return nullptr;
734
+ }
735
+
743
736
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
744
737
 
745
738
  return py::convert(winrt::Windows::System::Power::PowerManager::EnergySaverStatusChanged(param0));
@@ -753,14 +746,14 @@ namespace py::cpp::Windows::System::Power
753
746
 
754
747
  static PyObject* PowerManager_remove_EnergySaverStatusChanged(PyObject* /*unused*/, PyObject* arg) noexcept
755
748
  {
756
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatusChanged"))
757
- {
758
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
759
- return nullptr;
760
- }
761
-
762
749
  try
763
750
  {
751
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"EnergySaverStatusChanged"))
752
+ {
753
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
754
+ return nullptr;
755
+ }
756
+
764
757
  auto param0 = py::convert_to<winrt::event_token>(arg);
765
758
 
766
759
  winrt::Windows::System::Power::PowerManager::EnergySaverStatusChanged(param0);
@@ -775,14 +768,14 @@ namespace py::cpp::Windows::System::Power
775
768
 
776
769
  static PyObject* PowerManager_add_PowerSupplyStatusChanged(PyObject* /*unused*/, PyObject* arg) noexcept
777
770
  {
778
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatusChanged"))
779
- {
780
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
781
- return nullptr;
782
- }
783
-
784
771
  try
785
772
  {
773
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatusChanged"))
774
+ {
775
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
776
+ return nullptr;
777
+ }
778
+
786
779
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
787
780
 
788
781
  return py::convert(winrt::Windows::System::Power::PowerManager::PowerSupplyStatusChanged(param0));
@@ -796,14 +789,14 @@ namespace py::cpp::Windows::System::Power
796
789
 
797
790
  static PyObject* PowerManager_remove_PowerSupplyStatusChanged(PyObject* /*unused*/, PyObject* arg) noexcept
798
791
  {
799
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatusChanged"))
800
- {
801
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
802
- return nullptr;
803
- }
804
-
805
792
  try
806
793
  {
794
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"PowerSupplyStatusChanged"))
795
+ {
796
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
797
+ return nullptr;
798
+ }
799
+
807
800
  auto param0 = py::convert_to<winrt::event_token>(arg);
808
801
 
809
802
  winrt::Windows::System::Power::PowerManager::PowerSupplyStatusChanged(param0);
@@ -818,14 +811,14 @@ namespace py::cpp::Windows::System::Power
818
811
 
819
812
  static PyObject* PowerManager_add_RemainingChargePercentChanged(PyObject* /*unused*/, PyObject* arg) noexcept
820
813
  {
821
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercentChanged"))
822
- {
823
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
824
- return nullptr;
825
- }
826
-
827
814
  try
828
815
  {
816
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercentChanged"))
817
+ {
818
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
819
+ return nullptr;
820
+ }
821
+
829
822
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
830
823
 
831
824
  return py::convert(winrt::Windows::System::Power::PowerManager::RemainingChargePercentChanged(param0));
@@ -839,14 +832,14 @@ namespace py::cpp::Windows::System::Power
839
832
 
840
833
  static PyObject* PowerManager_remove_RemainingChargePercentChanged(PyObject* /*unused*/, PyObject* arg) noexcept
841
834
  {
842
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercentChanged"))
843
- {
844
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
845
- return nullptr;
846
- }
847
-
848
835
  try
849
836
  {
837
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingChargePercentChanged"))
838
+ {
839
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
840
+ return nullptr;
841
+ }
842
+
850
843
  auto param0 = py::convert_to<winrt::event_token>(arg);
851
844
 
852
845
  winrt::Windows::System::Power::PowerManager::RemainingChargePercentChanged(param0);
@@ -861,14 +854,14 @@ namespace py::cpp::Windows::System::Power
861
854
 
862
855
  static PyObject* PowerManager_add_RemainingDischargeTimeChanged(PyObject* /*unused*/, PyObject* arg) noexcept
863
856
  {
864
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTimeChanged"))
865
- {
866
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
867
- return nullptr;
868
- }
869
-
870
857
  try
871
858
  {
859
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTimeChanged"))
860
+ {
861
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
862
+ return nullptr;
863
+ }
864
+
872
865
  auto param0 = py::convert_to<winrt::Windows::Foundation::EventHandler<winrt::Windows::Foundation::IInspectable>>(arg);
873
866
 
874
867
  return py::convert(winrt::Windows::System::Power::PowerManager::RemainingDischargeTimeChanged(param0));
@@ -882,14 +875,14 @@ namespace py::cpp::Windows::System::Power
882
875
 
883
876
  static PyObject* PowerManager_remove_RemainingDischargeTimeChanged(PyObject* /*unused*/, PyObject* arg) noexcept
884
877
  {
885
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTimeChanged"))
886
- {
887
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
888
- return nullptr;
889
- }
890
-
891
878
  try
892
879
  {
880
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.System.Power.PowerManager", L"RemainingDischargeTimeChanged"))
881
+ {
882
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
883
+ return nullptr;
884
+ }
885
+
893
886
  auto param0 = py::convert_to<winrt::event_token>(arg);
894
887
 
895
888
  winrt::Windows::System::Power::PowerManager::RemainingDischargeTimeChanged(param0);
@@ -903,16 +896,6 @@ namespace py::cpp::Windows::System::Power
903
896
  }
904
897
 
905
898
  static PyMethodDef _methods_PowerManager[] = {
906
- { "add_battery_status_changed", reinterpret_cast<PyCFunction>(PowerManager_add_BatteryStatusChanged), METH_O | METH_STATIC, nullptr },
907
- { "remove_battery_status_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_BatteryStatusChanged), METH_O | METH_STATIC, nullptr },
908
- { "add_energy_saver_status_changed", reinterpret_cast<PyCFunction>(PowerManager_add_EnergySaverStatusChanged), METH_O | METH_STATIC, nullptr },
909
- { "remove_energy_saver_status_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_EnergySaverStatusChanged), METH_O | METH_STATIC, nullptr },
910
- { "add_power_supply_status_changed", reinterpret_cast<PyCFunction>(PowerManager_add_PowerSupplyStatusChanged), METH_O | METH_STATIC, nullptr },
911
- { "remove_power_supply_status_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_PowerSupplyStatusChanged), METH_O | METH_STATIC, nullptr },
912
- { "add_remaining_charge_percent_changed", reinterpret_cast<PyCFunction>(PowerManager_add_RemainingChargePercentChanged), METH_O | METH_STATIC, nullptr },
913
- { "remove_remaining_charge_percent_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_RemainingChargePercentChanged), METH_O | METH_STATIC, nullptr },
914
- { "add_remaining_discharge_time_changed", reinterpret_cast<PyCFunction>(PowerManager_add_RemainingDischargeTimeChanged), METH_O | METH_STATIC, nullptr },
915
- { "remove_remaining_discharge_time_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_RemainingDischargeTimeChanged), METH_O | METH_STATIC, nullptr },
916
899
  { }
917
900
  };
918
901
 
@@ -920,22 +903,19 @@ namespace py::cpp::Windows::System::Power
920
903
  { }
921
904
  };
922
905
 
923
- static PyType_Slot _type_slots_PowerManager[] =
924
- {
906
+ static PyType_Slot _type_slots_PowerManager[] = {
925
907
  { Py_tp_new, reinterpret_cast<void*>(_new_PowerManager) },
926
908
  { Py_tp_methods, reinterpret_cast<void*>(_methods_PowerManager) },
927
909
  { Py_tp_getset, reinterpret_cast<void*>(_getset_PowerManager) },
928
- { },
910
+ { }
929
911
  };
930
912
 
931
- static PyType_Spec type_spec_PowerManager =
932
- {
913
+ static PyType_Spec type_spec_PowerManager = {
933
914
  "winrt._winrt_windows_system_power.PowerManager",
934
915
  0,
935
916
  0,
936
917
  Py_TPFLAGS_DEFAULT,
937
- _type_slots_PowerManager
938
- };
918
+ _type_slots_PowerManager};
939
919
 
940
920
  static PyGetSetDef getset_PowerManager_Static[] = {
941
921
  { "battery_status", reinterpret_cast<getter>(PowerManager_get_BatteryStatus), nullptr, nullptr, nullptr },
@@ -947,6 +927,16 @@ namespace py::cpp::Windows::System::Power
947
927
  };
948
928
 
949
929
  static PyMethodDef methods_PowerManager_Static[] = {
930
+ { "add_battery_status_changed", reinterpret_cast<PyCFunction>(PowerManager_add_BatteryStatusChanged), METH_O, nullptr },
931
+ { "remove_battery_status_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_BatteryStatusChanged), METH_O, nullptr },
932
+ { "add_energy_saver_status_changed", reinterpret_cast<PyCFunction>(PowerManager_add_EnergySaverStatusChanged), METH_O, nullptr },
933
+ { "remove_energy_saver_status_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_EnergySaverStatusChanged), METH_O, nullptr },
934
+ { "add_power_supply_status_changed", reinterpret_cast<PyCFunction>(PowerManager_add_PowerSupplyStatusChanged), METH_O, nullptr },
935
+ { "remove_power_supply_status_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_PowerSupplyStatusChanged), METH_O, nullptr },
936
+ { "add_remaining_charge_percent_changed", reinterpret_cast<PyCFunction>(PowerManager_add_RemainingChargePercentChanged), METH_O, nullptr },
937
+ { "remove_remaining_charge_percent_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_RemainingChargePercentChanged), METH_O, nullptr },
938
+ { "add_remaining_discharge_time_changed", reinterpret_cast<PyCFunction>(PowerManager_add_RemainingDischargeTimeChanged), METH_O, nullptr },
939
+ { "remove_remaining_discharge_time_changed", reinterpret_cast<PyCFunction>(PowerManager_remove_RemainingDischargeTimeChanged), METH_O, nullptr },
950
940
  { }
951
941
  };
952
942
 
@@ -968,20 +958,19 @@ namespace py::cpp::Windows::System::Power
968
958
  };
969
959
 
970
960
  // ----- Windows.System.Power Initialization --------------------
971
- PyDoc_STRVAR(module_doc, "Windows::System::Power");
972
-
973
961
 
974
- static PyModuleDef module_def
975
- = {PyModuleDef_HEAD_INIT,
976
- "_winrt_windows_system_power",
977
- module_doc,
978
- 0,
979
- nullptr,
980
- nullptr,
981
- nullptr,
982
- nullptr,
983
- nullptr};
962
+ PyDoc_STRVAR(module_doc, "Windows.System.Power");
984
963
 
964
+ static PyModuleDef module_def = {
965
+ PyModuleDef_HEAD_INIT,
966
+ "_winrt_windows_system_power",
967
+ module_doc,
968
+ 0,
969
+ nullptr,
970
+ nullptr,
971
+ nullptr,
972
+ nullptr,
973
+ nullptr};
985
974
  } // py::cpp::Windows::System::Power
986
975
 
987
976
  PyMODINIT_FUNC PyInit__winrt_windows_system_power(void) noexcept
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,94 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.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 as windows_foundation
13
+
14
+ from winrt.windows.system.power import BatteryStatus, EnergySaverStatus, PowerSupplyStatus
15
+
16
+ Self = typing.TypeVar('Self')
17
+
18
+ @typing.final
19
+ class BackgroundEnergyManager_Static(type):
20
+ def add_recent_energy_usage_increased(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
21
+ def remove_recent_energy_usage_increased(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
22
+ def add_recent_energy_usage_returned_to_low(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
23
+ def remove_recent_energy_usage_returned_to_low(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
24
+ @_property
25
+ def excessive_usage_level(cls) -> winrt.system.UInt32: ...
26
+ @_property
27
+ def low_usage_level(cls) -> winrt.system.UInt32: ...
28
+ @_property
29
+ def max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
30
+ @_property
31
+ def near_max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
32
+ @_property
33
+ def near_termination_usage_level(cls) -> winrt.system.UInt32: ...
34
+ @_property
35
+ def recent_energy_usage(cls) -> winrt.system.UInt32: ...
36
+ @_property
37
+ def recent_energy_usage_level(cls) -> winrt.system.UInt32: ...
38
+ @_property
39
+ def termination_usage_level(cls) -> winrt.system.UInt32: ...
40
+
41
+ @typing.final
42
+ class BackgroundEnergyManager(winrt.system.Object, metaclass=BackgroundEnergyManager_Static):
43
+ pass
44
+
45
+ @typing.final
46
+ class ForegroundEnergyManager_Static(type):
47
+ def add_recent_energy_usage_increased(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
48
+ def remove_recent_energy_usage_increased(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
49
+ def add_recent_energy_usage_returned_to_low(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
50
+ def remove_recent_energy_usage_returned_to_low(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
51
+ @_property
52
+ def excessive_usage_level(cls) -> winrt.system.UInt32: ...
53
+ @_property
54
+ def low_usage_level(cls) -> winrt.system.UInt32: ...
55
+ @_property
56
+ def max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
57
+ @_property
58
+ def near_max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
59
+ @_property
60
+ def recent_energy_usage(cls) -> winrt.system.UInt32: ...
61
+ @_property
62
+ def recent_energy_usage_level(cls) -> winrt.system.UInt32: ...
63
+
64
+ @typing.final
65
+ class ForegroundEnergyManager(winrt.system.Object, metaclass=ForegroundEnergyManager_Static):
66
+ pass
67
+
68
+ @typing.final
69
+ class PowerManager_Static(type):
70
+ def add_battery_status_changed(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
71
+ def remove_battery_status_changed(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
72
+ def add_energy_saver_status_changed(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
73
+ def remove_energy_saver_status_changed(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
74
+ def add_power_supply_status_changed(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
75
+ def remove_power_supply_status_changed(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
76
+ def add_remaining_charge_percent_changed(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
77
+ def remove_remaining_charge_percent_changed(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
78
+ def add_remaining_discharge_time_changed(cls, handler: windows_foundation.EventHandler[winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
79
+ def remove_remaining_discharge_time_changed(cls, token: windows_foundation.EventRegistrationToken, /) -> None: ...
80
+ @_property
81
+ def battery_status(cls) -> BatteryStatus: ...
82
+ @_property
83
+ def energy_saver_status(cls) -> EnergySaverStatus: ...
84
+ @_property
85
+ def power_supply_status(cls) -> PowerSupplyStatus: ...
86
+ @_property
87
+ def remaining_charge_percent(cls) -> winrt.system.Int32: ...
88
+ @_property
89
+ def remaining_discharge_time(cls) -> datetime.timedelta: ...
90
+
91
+ @typing.final
92
+ class PowerManager(winrt.system.Object, metaclass=PowerManager_Static):
93
+ pass
94
+
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Power
3
- Version: 2.0.1
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,9 +12,9 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.1.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.1.0
@@ -1 +0,0 @@
1
- 2.0.1
@@ -1,97 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- import datetime
4
- import sys
5
- import types
6
- import typing
7
- import uuid as _uuid
8
- from builtins import property as _property
9
-
10
- import winrt._winrt
11
- import winrt.system
12
- import winrt.windows.foundation
13
-
14
- from winrt.windows.system.power import BatteryStatus, EnergySaverStatus, PowerSupplyStatus
15
-
16
- Self = typing.TypeVar('Self')
17
-
18
- @typing.final
19
- class BackgroundEnergyManager_Static(type):
20
- def add_recent_energy_usage_increased(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
21
- def remove_recent_energy_usage_increased(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
22
- def add_recent_energy_usage_returned_to_low(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
23
- def remove_recent_energy_usage_returned_to_low(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
24
- @_property
25
- def excessive_usage_level(cls) -> winrt.system.UInt32: ...
26
- @_property
27
- def low_usage_level(cls) -> winrt.system.UInt32: ...
28
- @_property
29
- def max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
30
- @_property
31
- def near_max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
32
- @_property
33
- def near_termination_usage_level(cls) -> winrt.system.UInt32: ...
34
- @_property
35
- def recent_energy_usage(cls) -> winrt.system.UInt32: ...
36
- @_property
37
- def recent_energy_usage_level(cls) -> winrt.system.UInt32: ...
38
- @_property
39
- def termination_usage_level(cls) -> winrt.system.UInt32: ...
40
-
41
- @typing.final
42
- class BackgroundEnergyManager(winrt.system.Object, metaclass=BackgroundEnergyManager_Static):
43
- @staticmethod
44
- def _from(obj: winrt.system.Object, /) -> BackgroundEnergyManager: ...
45
-
46
- @typing.final
47
- class ForegroundEnergyManager_Static(type):
48
- def add_recent_energy_usage_increased(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
49
- def remove_recent_energy_usage_increased(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
50
- def add_recent_energy_usage_returned_to_low(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
51
- def remove_recent_energy_usage_returned_to_low(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
52
- @_property
53
- def excessive_usage_level(cls) -> winrt.system.UInt32: ...
54
- @_property
55
- def low_usage_level(cls) -> winrt.system.UInt32: ...
56
- @_property
57
- def max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
58
- @_property
59
- def near_max_acceptable_usage_level(cls) -> winrt.system.UInt32: ...
60
- @_property
61
- def recent_energy_usage(cls) -> winrt.system.UInt32: ...
62
- @_property
63
- def recent_energy_usage_level(cls) -> winrt.system.UInt32: ...
64
-
65
- @typing.final
66
- class ForegroundEnergyManager(winrt.system.Object, metaclass=ForegroundEnergyManager_Static):
67
- @staticmethod
68
- def _from(obj: winrt.system.Object, /) -> ForegroundEnergyManager: ...
69
-
70
- @typing.final
71
- class PowerManager_Static(type):
72
- def add_battery_status_changed(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
73
- def remove_battery_status_changed(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
74
- def add_energy_saver_status_changed(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
75
- def remove_energy_saver_status_changed(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
76
- def add_power_supply_status_changed(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
77
- def remove_power_supply_status_changed(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
78
- def add_remaining_charge_percent_changed(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
79
- def remove_remaining_charge_percent_changed(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
80
- def add_remaining_discharge_time_changed(cls, handler: winrt.windows.foundation.EventHandler[winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
81
- def remove_remaining_discharge_time_changed(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
82
- @_property
83
- def battery_status(cls) -> BatteryStatus: ...
84
- @_property
85
- def energy_saver_status(cls) -> EnergySaverStatus: ...
86
- @_property
87
- def power_supply_status(cls) -> PowerSupplyStatus: ...
88
- @_property
89
- def remaining_charge_percent(cls) -> winrt.system.Int32: ...
90
- @_property
91
- def remaining_discharge_time(cls) -> datetime.timedelta: ...
92
-
93
- @typing.final
94
- class PowerManager(winrt.system.Object, metaclass=PowerManager_Static):
95
- @staticmethod
96
- def _from(obj: winrt.system.Object, /) -> PowerManager: ...
97
-
@@ -1,4 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1