winrt-Windows.ApplicationModel.ExtendedExecution 2.0.1__tar.gz → 2.2.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_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/PKG-INFO +4 -4
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/all-requirements.txt +2 -2
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/py.Windows.ApplicationModel.ExtendedExecution.cpp +169 -98
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/pyproject.toml +3 -2
- winrt_windows_applicationmodel_extendedexecution-2.2.0/pywinrt-version.txt +1 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/requirements.txt +2 -2
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt/_winrt_windows_applicationmodel_extendedexecution.pyi +6 -6
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt/windows/applicationmodel/extendedexecution/__init__.py +1 -1
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/PKG-INFO +4 -4
- winrt_windows_applicationmodel_extendedexecution-2.2.0/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/requires.txt +4 -0
- winrt_windows_applicationmodel_extendedexecution-2.0.1/pywinrt-version.txt +0 -1
- winrt_windows_applicationmodel_extendedexecution-2.0.1/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/requires.txt +0 -4
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/README.md +0 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/setup.cfg +0 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/setup.py +0 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt/windows/applicationmodel/extendedexecution/py.typed +0 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/SOURCES.txt +0 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/dependency_links.txt +0 -0
- {winrt_windows_applicationmodel_extendedexecution-2.0.1 → winrt_windows_applicationmodel_extendedexecution-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.ApplicationModel.ExtendedExecution
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.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.0
|
|
15
|
+
Requires-Dist: winrt-runtime==2.2.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]==2.0
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation[all]==2.2.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
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
|
-
winrt-Windows.Foundation[all]==2.0
|
|
3
|
+
winrt-Windows.Foundation[all]==2.2.0
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
3
|
#include "py.Windows.ApplicationModel.ExtendedExecution.h"
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
7
6
|
{
|
|
8
7
|
// ----- ExtendedExecutionRevokedEventArgs class --------------------
|
|
@@ -24,14 +23,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
24
23
|
|
|
25
24
|
static PyObject* ExtendedExecutionRevokedEventArgs_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs* self, void* /*unused*/) noexcept
|
|
26
25
|
{
|
|
27
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionRevokedEventArgs", L"Reason"))
|
|
28
|
-
{
|
|
29
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
30
|
-
return nullptr;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
26
|
try
|
|
34
27
|
{
|
|
28
|
+
static std::optional<bool> is_property_present{};
|
|
29
|
+
|
|
30
|
+
if (!is_property_present.has_value())
|
|
31
|
+
{
|
|
32
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionRevokedEventArgs", L"Reason");
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!is_property_present.value())
|
|
36
|
+
{
|
|
37
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
38
|
+
return nullptr;
|
|
39
|
+
}
|
|
40
|
+
|
|
35
41
|
return py::convert(self->obj.Reason());
|
|
36
42
|
}
|
|
37
43
|
catch (...)
|
|
@@ -76,23 +82,20 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
76
82
|
{ }
|
|
77
83
|
};
|
|
78
84
|
|
|
79
|
-
static PyType_Slot _type_slots_ExtendedExecutionRevokedEventArgs[] =
|
|
80
|
-
{
|
|
85
|
+
static PyType_Slot _type_slots_ExtendedExecutionRevokedEventArgs[] = {
|
|
81
86
|
{ Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionRevokedEventArgs) },
|
|
82
87
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionRevokedEventArgs) },
|
|
83
88
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionRevokedEventArgs) },
|
|
84
89
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionRevokedEventArgs) },
|
|
85
|
-
{ }
|
|
90
|
+
{ }
|
|
86
91
|
};
|
|
87
92
|
|
|
88
|
-
static PyType_Spec type_spec_ExtendedExecutionRevokedEventArgs =
|
|
89
|
-
{
|
|
93
|
+
static PyType_Spec type_spec_ExtendedExecutionRevokedEventArgs = {
|
|
90
94
|
"winrt._winrt_windows_applicationmodel_extendedexecution.ExtendedExecutionRevokedEventArgs",
|
|
91
95
|
sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs),
|
|
92
96
|
0,
|
|
93
97
|
Py_TPFLAGS_DEFAULT,
|
|
94
|
-
_type_slots_ExtendedExecutionRevokedEventArgs
|
|
95
|
-
};
|
|
98
|
+
_type_slots_ExtendedExecutionRevokedEventArgs};
|
|
96
99
|
|
|
97
100
|
// ----- ExtendedExecutionSession class --------------------
|
|
98
101
|
|
|
@@ -109,7 +112,7 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
109
112
|
{
|
|
110
113
|
try
|
|
111
114
|
{
|
|
112
|
-
winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession instance{
|
|
115
|
+
winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession instance{};
|
|
113
116
|
return py::wrap(instance, type);
|
|
114
117
|
}
|
|
115
118
|
catch (...)
|
|
@@ -139,14 +142,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
139
142
|
|
|
140
143
|
if (arg_count == 0)
|
|
141
144
|
{
|
|
142
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Close", 0))
|
|
143
|
-
{
|
|
144
|
-
py::set_arg_count_version_error(0);
|
|
145
|
-
return nullptr;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
145
|
try
|
|
149
146
|
{
|
|
147
|
+
static std::optional<bool> is_overload_present{};
|
|
148
|
+
|
|
149
|
+
if (!is_overload_present.has_value())
|
|
150
|
+
{
|
|
151
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Close", 0);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (!is_overload_present.value())
|
|
155
|
+
{
|
|
156
|
+
py::set_arg_count_version_error(0);
|
|
157
|
+
return nullptr;
|
|
158
|
+
}
|
|
159
|
+
|
|
150
160
|
self->obj.Close();
|
|
151
161
|
Py_RETURN_NONE;
|
|
152
162
|
}
|
|
@@ -169,14 +179,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
169
179
|
|
|
170
180
|
if (arg_count == 0)
|
|
171
181
|
{
|
|
172
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"RequestExtensionAsync", 0))
|
|
173
|
-
{
|
|
174
|
-
py::set_arg_count_version_error(0);
|
|
175
|
-
return nullptr;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
182
|
try
|
|
179
183
|
{
|
|
184
|
+
static std::optional<bool> is_overload_present{};
|
|
185
|
+
|
|
186
|
+
if (!is_overload_present.has_value())
|
|
187
|
+
{
|
|
188
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"RequestExtensionAsync", 0);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (!is_overload_present.value())
|
|
192
|
+
{
|
|
193
|
+
py::set_arg_count_version_error(0);
|
|
194
|
+
return nullptr;
|
|
195
|
+
}
|
|
196
|
+
|
|
180
197
|
return py::convert(self->obj.RequestExtensionAsync());
|
|
181
198
|
}
|
|
182
199
|
catch (...)
|
|
@@ -194,14 +211,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
194
211
|
|
|
195
212
|
static PyObject* ExtendedExecutionSession_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, void* /*unused*/) noexcept
|
|
196
213
|
{
|
|
197
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Reason"))
|
|
198
|
-
{
|
|
199
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
200
|
-
return nullptr;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
214
|
try
|
|
204
215
|
{
|
|
216
|
+
static std::optional<bool> is_property_present{};
|
|
217
|
+
|
|
218
|
+
if (!is_property_present.has_value())
|
|
219
|
+
{
|
|
220
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Reason");
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (!is_property_present.value())
|
|
224
|
+
{
|
|
225
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
226
|
+
return nullptr;
|
|
227
|
+
}
|
|
228
|
+
|
|
205
229
|
return py::convert(self->obj.Reason());
|
|
206
230
|
}
|
|
207
231
|
catch (...)
|
|
@@ -213,12 +237,6 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
213
237
|
|
|
214
238
|
static int ExtendedExecutionSession_put_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
215
239
|
{
|
|
216
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Reason"))
|
|
217
|
-
{
|
|
218
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
219
|
-
return -1;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
240
|
if (arg == nullptr)
|
|
223
241
|
{
|
|
224
242
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -227,6 +245,19 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
227
245
|
|
|
228
246
|
try
|
|
229
247
|
{
|
|
248
|
+
static std::optional<bool> is_property_present{};
|
|
249
|
+
|
|
250
|
+
if (!is_property_present.has_value())
|
|
251
|
+
{
|
|
252
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Reason");
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (!is_property_present.value())
|
|
256
|
+
{
|
|
257
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
258
|
+
return -1;
|
|
259
|
+
}
|
|
260
|
+
|
|
230
261
|
auto param0 = py::convert_to<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason>(arg);
|
|
231
262
|
|
|
232
263
|
self->obj.Reason(param0);
|
|
@@ -241,14 +272,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
241
272
|
|
|
242
273
|
static PyObject* ExtendedExecutionSession_get_PercentProgress(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, void* /*unused*/) noexcept
|
|
243
274
|
{
|
|
244
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"PercentProgress"))
|
|
245
|
-
{
|
|
246
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
247
|
-
return nullptr;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
275
|
try
|
|
251
276
|
{
|
|
277
|
+
static std::optional<bool> is_property_present{};
|
|
278
|
+
|
|
279
|
+
if (!is_property_present.has_value())
|
|
280
|
+
{
|
|
281
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"PercentProgress");
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (!is_property_present.value())
|
|
285
|
+
{
|
|
286
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
287
|
+
return nullptr;
|
|
288
|
+
}
|
|
289
|
+
|
|
252
290
|
return py::convert(self->obj.PercentProgress());
|
|
253
291
|
}
|
|
254
292
|
catch (...)
|
|
@@ -260,12 +298,6 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
260
298
|
|
|
261
299
|
static int ExtendedExecutionSession_put_PercentProgress(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
262
300
|
{
|
|
263
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"PercentProgress"))
|
|
264
|
-
{
|
|
265
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
266
|
-
return -1;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
301
|
if (arg == nullptr)
|
|
270
302
|
{
|
|
271
303
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -274,6 +306,19 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
274
306
|
|
|
275
307
|
try
|
|
276
308
|
{
|
|
309
|
+
static std::optional<bool> is_property_present{};
|
|
310
|
+
|
|
311
|
+
if (!is_property_present.has_value())
|
|
312
|
+
{
|
|
313
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"PercentProgress");
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
if (!is_property_present.value())
|
|
317
|
+
{
|
|
318
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
319
|
+
return -1;
|
|
320
|
+
}
|
|
321
|
+
|
|
277
322
|
auto param0 = py::convert_to<uint32_t>(arg);
|
|
278
323
|
|
|
279
324
|
self->obj.PercentProgress(param0);
|
|
@@ -288,14 +333,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
288
333
|
|
|
289
334
|
static PyObject* ExtendedExecutionSession_get_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, void* /*unused*/) noexcept
|
|
290
335
|
{
|
|
291
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Description"))
|
|
292
|
-
{
|
|
293
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
294
|
-
return nullptr;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
336
|
try
|
|
298
337
|
{
|
|
338
|
+
static std::optional<bool> is_property_present{};
|
|
339
|
+
|
|
340
|
+
if (!is_property_present.has_value())
|
|
341
|
+
{
|
|
342
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Description");
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (!is_property_present.value())
|
|
346
|
+
{
|
|
347
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
348
|
+
return nullptr;
|
|
349
|
+
}
|
|
350
|
+
|
|
299
351
|
return py::convert(self->obj.Description());
|
|
300
352
|
}
|
|
301
353
|
catch (...)
|
|
@@ -307,12 +359,6 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
307
359
|
|
|
308
360
|
static int ExtendedExecutionSession_put_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
309
361
|
{
|
|
310
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Description"))
|
|
311
|
-
{
|
|
312
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
313
|
-
return -1;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
362
|
if (arg == nullptr)
|
|
317
363
|
{
|
|
318
364
|
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
@@ -321,6 +367,19 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
321
367
|
|
|
322
368
|
try
|
|
323
369
|
{
|
|
370
|
+
static std::optional<bool> is_property_present{};
|
|
371
|
+
|
|
372
|
+
if (!is_property_present.has_value())
|
|
373
|
+
{
|
|
374
|
+
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Description");
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (!is_property_present.value())
|
|
378
|
+
{
|
|
379
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
380
|
+
return -1;
|
|
381
|
+
}
|
|
382
|
+
|
|
324
383
|
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
325
384
|
|
|
326
385
|
self->obj.Description(param0);
|
|
@@ -335,14 +394,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
335
394
|
|
|
336
395
|
static PyObject* ExtendedExecutionSession_add_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg) noexcept
|
|
337
396
|
{
|
|
338
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Revoked"))
|
|
339
|
-
{
|
|
340
|
-
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
341
|
-
return nullptr;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
397
|
try
|
|
345
398
|
{
|
|
399
|
+
static std::optional<bool> is_event_present{};
|
|
400
|
+
|
|
401
|
+
if (!is_event_present.has_value())
|
|
402
|
+
{
|
|
403
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Revoked");
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (!is_event_present.value())
|
|
407
|
+
{
|
|
408
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
409
|
+
return nullptr;
|
|
410
|
+
}
|
|
411
|
+
|
|
346
412
|
auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs>>(arg);
|
|
347
413
|
|
|
348
414
|
return py::convert(self->obj.Revoked(param0));
|
|
@@ -356,14 +422,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
356
422
|
|
|
357
423
|
static PyObject* ExtendedExecutionSession_remove_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg) noexcept
|
|
358
424
|
{
|
|
359
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Revoked"))
|
|
360
|
-
{
|
|
361
|
-
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
362
|
-
return nullptr;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
425
|
try
|
|
366
426
|
{
|
|
427
|
+
static std::optional<bool> is_event_present{};
|
|
428
|
+
|
|
429
|
+
if (!is_event_present.has_value())
|
|
430
|
+
{
|
|
431
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.ExtendedExecutionSession", L"Revoked");
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
if (!is_event_present.value())
|
|
435
|
+
{
|
|
436
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
437
|
+
return nullptr;
|
|
438
|
+
}
|
|
439
|
+
|
|
367
440
|
auto param0 = py::convert_to<winrt::event_token>(arg);
|
|
368
441
|
|
|
369
442
|
self->obj.Revoked(param0);
|
|
@@ -427,7 +500,7 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
427
500
|
{ "_assign_array_", _assign_array_ExtendedExecutionSession, METH_O | METH_STATIC, nullptr },
|
|
428
501
|
{ "_from", reinterpret_cast<PyCFunction>(_from_ExtendedExecutionSession), METH_O | METH_STATIC, nullptr },
|
|
429
502
|
{ "__enter__", reinterpret_cast<PyCFunction>(_enter_ExtendedExecutionSession), METH_NOARGS, nullptr },
|
|
430
|
-
{ "__exit__",
|
|
503
|
+
{ "__exit__", reinterpret_cast<PyCFunction>(_exit_ExtendedExecutionSession), METH_VARARGS, nullptr },
|
|
431
504
|
{ }
|
|
432
505
|
};
|
|
433
506
|
|
|
@@ -438,39 +511,35 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
|
438
511
|
{ }
|
|
439
512
|
};
|
|
440
513
|
|
|
441
|
-
static PyType_Slot _type_slots_ExtendedExecutionSession[] =
|
|
442
|
-
{
|
|
514
|
+
static PyType_Slot _type_slots_ExtendedExecutionSession[] = {
|
|
443
515
|
{ Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionSession) },
|
|
444
516
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionSession) },
|
|
445
517
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionSession) },
|
|
446
518
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionSession) },
|
|
447
|
-
{ }
|
|
519
|
+
{ }
|
|
448
520
|
};
|
|
449
521
|
|
|
450
|
-
static PyType_Spec type_spec_ExtendedExecutionSession =
|
|
451
|
-
{
|
|
522
|
+
static PyType_Spec type_spec_ExtendedExecutionSession = {
|
|
452
523
|
"winrt._winrt_windows_applicationmodel_extendedexecution.ExtendedExecutionSession",
|
|
453
524
|
sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession),
|
|
454
525
|
0,
|
|
455
526
|
Py_TPFLAGS_DEFAULT,
|
|
456
|
-
_type_slots_ExtendedExecutionSession
|
|
457
|
-
};
|
|
527
|
+
_type_slots_ExtendedExecutionSession};
|
|
458
528
|
|
|
459
529
|
// ----- Windows.ApplicationModel.ExtendedExecution Initialization --------------------
|
|
460
|
-
PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::ExtendedExecution");
|
|
461
530
|
|
|
531
|
+
PyDoc_STRVAR(module_doc, "Windows.ApplicationModel.ExtendedExecution");
|
|
462
532
|
|
|
463
|
-
static PyModuleDef module_def
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
533
|
+
static PyModuleDef module_def = {
|
|
534
|
+
PyModuleDef_HEAD_INIT,
|
|
535
|
+
"_winrt_windows_applicationmodel_extendedexecution",
|
|
536
|
+
module_doc,
|
|
537
|
+
0,
|
|
538
|
+
nullptr,
|
|
539
|
+
nullptr,
|
|
540
|
+
nullptr,
|
|
541
|
+
nullptr,
|
|
542
|
+
nullptr};
|
|
474
543
|
} // py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
475
544
|
|
|
476
545
|
PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_extendedexecution(void) noexcept
|
|
@@ -502,12 +571,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_extendedexecution(void) no
|
|
|
502
571
|
return nullptr;
|
|
503
572
|
}
|
|
504
573
|
|
|
505
|
-
|
|
574
|
+
py::pytype_handle ExtendedExecutionRevokedEventArgs_type{py::register_python_type(module.get(), &type_spec_ExtendedExecutionRevokedEventArgs, object_bases.get(), nullptr)};
|
|
575
|
+
if (!ExtendedExecutionRevokedEventArgs_type)
|
|
506
576
|
{
|
|
507
577
|
return nullptr;
|
|
508
578
|
}
|
|
509
579
|
|
|
510
|
-
|
|
580
|
+
py::pytype_handle ExtendedExecutionSession_type{py::register_python_type(module.get(), &type_spec_ExtendedExecutionSession, object_bases.get(), nullptr)};
|
|
581
|
+
if (!ExtendedExecutionSession_type)
|
|
511
582
|
{
|
|
512
583
|
return nullptr;
|
|
513
584
|
}
|
|
@@ -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.2.0
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
|
-
winrt-runtime==2.0
|
|
3
|
+
winrt-runtime==2.2.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
|
|
2
2
|
|
|
3
3
|
import datetime
|
|
4
4
|
import sys
|
|
@@ -9,7 +9,7 @@ from builtins import property as _property
|
|
|
9
9
|
|
|
10
10
|
import winrt._winrt
|
|
11
11
|
import winrt.system
|
|
12
|
-
import winrt.windows.foundation
|
|
12
|
+
import winrt.windows.foundation as windows_foundation
|
|
13
13
|
|
|
14
14
|
from winrt.windows.applicationmodel.extendedexecution import ExtendedExecutionReason, ExtendedExecutionResult, ExtendedExecutionRevokedReason
|
|
15
15
|
|
|
@@ -28,11 +28,11 @@ class ExtendedExecutionSession(winrt.system.Object):
|
|
|
28
28
|
def __exit__(self, *args) -> None: ...
|
|
29
29
|
@staticmethod
|
|
30
30
|
def _from(obj: winrt.system.Object, /) -> ExtendedExecutionSession: ...
|
|
31
|
-
def __new__(cls: typing.Type[ExtendedExecutionSession]) -> ExtendedExecutionSession
|
|
31
|
+
def __new__(cls: typing.Type[ExtendedExecutionSession]) -> ExtendedExecutionSession: ...
|
|
32
32
|
def close(self) -> None: ...
|
|
33
|
-
def request_extension_async(self) ->
|
|
34
|
-
def add_revoked(self, handler:
|
|
35
|
-
def remove_revoked(self, token:
|
|
33
|
+
def request_extension_async(self) -> windows_foundation.IAsyncOperation[ExtendedExecutionResult]: ...
|
|
34
|
+
def add_revoked(self, handler: windows_foundation.TypedEventHandler[winrt.system.Object, ExtendedExecutionRevokedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
|
|
35
|
+
def remove_revoked(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
|
|
36
36
|
@_property
|
|
37
37
|
def reason(self) -> ExtendedExecutionReason: ...
|
|
38
38
|
@reason.setter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.ApplicationModel.ExtendedExecution
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.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.0
|
|
15
|
+
Requires-Dist: winrt-runtime==2.2.0
|
|
16
16
|
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]==2.0
|
|
17
|
+
Requires-Dist: winrt-Windows.Foundation[all]==2.2.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.0.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|