winrt-Windows.ApplicationModel.ExtendedExecution.Foreground 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_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/PKG-INFO +4 -4
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/all-requirements.txt +2 -2
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/py.Windows.ApplicationModel.ExtendedExecution.Foreground.cpp +143 -86
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/pyproject.toml +3 -2
- winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0/pywinrt-version.txt +1 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/requirements.txt +2 -2
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt/_winrt_windows_applicationmodel_extendedexecution_foreground.pyi +6 -6
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt/windows/applicationmodel/extendedexecution/foreground/__init__.py +1 -1
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/PKG-INFO +4 -4
- winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/requires.txt +4 -0
- winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1/pywinrt-version.txt +0 -1
- winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/requires.txt +0 -4
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/README.md +0 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/setup.cfg +0 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/setup.py +0 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt/windows/applicationmodel/extendedexecution/foreground/py.typed +0 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/SOURCES.txt +0 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/dependency_links.txt +0 -0
- {winrt_windows_applicationmodel_extendedexecution_foreground-2.0.1 → winrt_windows_applicationmodel_extendedexecution_foreground-2.2.0}/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.ApplicationModel.ExtendedExecution.Foreground
|
|
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.Foreground.h"
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
7
6
|
{
|
|
8
7
|
// ----- ExtendedExecutionForegroundRevokedEventArgs class --------------------
|
|
@@ -24,14 +23,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
24
23
|
|
|
25
24
|
static PyObject* ExtendedExecutionForegroundRevokedEventArgs_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs* self, void* /*unused*/) noexcept
|
|
26
25
|
{
|
|
27
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundRevokedEventArgs", 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.Foreground.ExtendedExecutionForegroundRevokedEventArgs", 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::Foreground
|
|
|
76
82
|
{ }
|
|
77
83
|
};
|
|
78
84
|
|
|
79
|
-
static PyType_Slot _type_slots_ExtendedExecutionForegroundRevokedEventArgs[] =
|
|
80
|
-
{
|
|
85
|
+
static PyType_Slot _type_slots_ExtendedExecutionForegroundRevokedEventArgs[] = {
|
|
81
86
|
{ Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionForegroundRevokedEventArgs) },
|
|
82
87
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionForegroundRevokedEventArgs) },
|
|
83
88
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionForegroundRevokedEventArgs) },
|
|
84
89
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionForegroundRevokedEventArgs) },
|
|
85
|
-
{ }
|
|
90
|
+
{ }
|
|
86
91
|
};
|
|
87
92
|
|
|
88
|
-
static PyType_Spec type_spec_ExtendedExecutionForegroundRevokedEventArgs =
|
|
89
|
-
{
|
|
93
|
+
static PyType_Spec type_spec_ExtendedExecutionForegroundRevokedEventArgs = {
|
|
90
94
|
"winrt._winrt_windows_applicationmodel_extendedexecution_foreground.ExtendedExecutionForegroundRevokedEventArgs",
|
|
91
95
|
sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs),
|
|
92
96
|
0,
|
|
93
97
|
Py_TPFLAGS_DEFAULT,
|
|
94
|
-
_type_slots_ExtendedExecutionForegroundRevokedEventArgs
|
|
95
|
-
};
|
|
98
|
+
_type_slots_ExtendedExecutionForegroundRevokedEventArgs};
|
|
96
99
|
|
|
97
100
|
// ----- ExtendedExecutionForegroundSession class --------------------
|
|
98
101
|
|
|
@@ -109,7 +112,7 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
109
112
|
{
|
|
110
113
|
try
|
|
111
114
|
{
|
|
112
|
-
winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession instance{
|
|
115
|
+
winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession instance{};
|
|
113
116
|
return py::wrap(instance, type);
|
|
114
117
|
}
|
|
115
118
|
catch (...)
|
|
@@ -139,14 +142,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
139
142
|
|
|
140
143
|
if (arg_count == 0)
|
|
141
144
|
{
|
|
142
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", 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.Foreground.ExtendedExecutionForegroundSession", 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::Foreground
|
|
|
169
179
|
|
|
170
180
|
if (arg_count == 0)
|
|
171
181
|
{
|
|
172
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", 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.Foreground.ExtendedExecutionForegroundSession", 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::Foreground
|
|
|
194
211
|
|
|
195
212
|
static PyObject* ExtendedExecutionForegroundSession_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, void* /*unused*/) noexcept
|
|
196
213
|
{
|
|
197
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", 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.Foreground.ExtendedExecutionForegroundSession", 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::Foreground
|
|
|
213
237
|
|
|
214
238
|
static int ExtendedExecutionForegroundSession_put_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
215
239
|
{
|
|
216
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", 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::Foreground
|
|
|
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.Foreground.ExtendedExecutionForegroundSession", 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::Foreground::ExtendedExecutionForegroundReason>(arg);
|
|
231
262
|
|
|
232
263
|
self->obj.Reason(param0);
|
|
@@ -241,14 +272,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
241
272
|
|
|
242
273
|
static PyObject* ExtendedExecutionForegroundSession_get_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, void* /*unused*/) noexcept
|
|
243
274
|
{
|
|
244
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", L"Description"))
|
|
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.Foreground.ExtendedExecutionForegroundSession", L"Description");
|
|
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.Description());
|
|
253
291
|
}
|
|
254
292
|
catch (...)
|
|
@@ -260,12 +298,6 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
260
298
|
|
|
261
299
|
static int ExtendedExecutionForegroundSession_put_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
262
300
|
{
|
|
263
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", L"Description"))
|
|
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::Foreground
|
|
|
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.Foreground.ExtendedExecutionForegroundSession", L"Description");
|
|
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<winrt::hstring>(arg);
|
|
278
323
|
|
|
279
324
|
self->obj.Description(param0);
|
|
@@ -288,14 +333,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
288
333
|
|
|
289
334
|
static PyObject* ExtendedExecutionForegroundSession_add_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg) noexcept
|
|
290
335
|
{
|
|
291
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", L"Revoked"))
|
|
292
|
-
{
|
|
293
|
-
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
294
|
-
return nullptr;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
336
|
try
|
|
298
337
|
{
|
|
338
|
+
static std::optional<bool> is_event_present{};
|
|
339
|
+
|
|
340
|
+
if (!is_event_present.has_value())
|
|
341
|
+
{
|
|
342
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", L"Revoked");
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
if (!is_event_present.value())
|
|
346
|
+
{
|
|
347
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
348
|
+
return nullptr;
|
|
349
|
+
}
|
|
350
|
+
|
|
299
351
|
auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs>>(arg);
|
|
300
352
|
|
|
301
353
|
return py::convert(self->obj.Revoked(param0));
|
|
@@ -309,14 +361,21 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
309
361
|
|
|
310
362
|
static PyObject* ExtendedExecutionForegroundSession_remove_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg) noexcept
|
|
311
363
|
{
|
|
312
|
-
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", L"Revoked"))
|
|
313
|
-
{
|
|
314
|
-
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
315
|
-
return nullptr;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
364
|
try
|
|
319
365
|
{
|
|
366
|
+
static std::optional<bool> is_event_present{};
|
|
367
|
+
|
|
368
|
+
if (!is_event_present.has_value())
|
|
369
|
+
{
|
|
370
|
+
is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.ExtendedExecution.Foreground.ExtendedExecutionForegroundSession", L"Revoked");
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (!is_event_present.value())
|
|
374
|
+
{
|
|
375
|
+
PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
|
|
376
|
+
return nullptr;
|
|
377
|
+
}
|
|
378
|
+
|
|
320
379
|
auto param0 = py::convert_to<winrt::event_token>(arg);
|
|
321
380
|
|
|
322
381
|
self->obj.Revoked(param0);
|
|
@@ -380,7 +439,7 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
380
439
|
{ "_assign_array_", _assign_array_ExtendedExecutionForegroundSession, METH_O | METH_STATIC, nullptr },
|
|
381
440
|
{ "_from", reinterpret_cast<PyCFunction>(_from_ExtendedExecutionForegroundSession), METH_O | METH_STATIC, nullptr },
|
|
382
441
|
{ "__enter__", reinterpret_cast<PyCFunction>(_enter_ExtendedExecutionForegroundSession), METH_NOARGS, nullptr },
|
|
383
|
-
{ "__exit__",
|
|
442
|
+
{ "__exit__", reinterpret_cast<PyCFunction>(_exit_ExtendedExecutionForegroundSession), METH_VARARGS, nullptr },
|
|
384
443
|
{ }
|
|
385
444
|
};
|
|
386
445
|
|
|
@@ -390,39 +449,35 @@ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
|
390
449
|
{ }
|
|
391
450
|
};
|
|
392
451
|
|
|
393
|
-
static PyType_Slot _type_slots_ExtendedExecutionForegroundSession[] =
|
|
394
|
-
{
|
|
452
|
+
static PyType_Slot _type_slots_ExtendedExecutionForegroundSession[] = {
|
|
395
453
|
{ Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionForegroundSession) },
|
|
396
454
|
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionForegroundSession) },
|
|
397
455
|
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionForegroundSession) },
|
|
398
456
|
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionForegroundSession) },
|
|
399
|
-
{ }
|
|
457
|
+
{ }
|
|
400
458
|
};
|
|
401
459
|
|
|
402
|
-
static PyType_Spec type_spec_ExtendedExecutionForegroundSession =
|
|
403
|
-
{
|
|
460
|
+
static PyType_Spec type_spec_ExtendedExecutionForegroundSession = {
|
|
404
461
|
"winrt._winrt_windows_applicationmodel_extendedexecution_foreground.ExtendedExecutionForegroundSession",
|
|
405
462
|
sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession),
|
|
406
463
|
0,
|
|
407
464
|
Py_TPFLAGS_DEFAULT,
|
|
408
|
-
_type_slots_ExtendedExecutionForegroundSession
|
|
409
|
-
};
|
|
465
|
+
_type_slots_ExtendedExecutionForegroundSession};
|
|
410
466
|
|
|
411
467
|
// ----- Windows.ApplicationModel.ExtendedExecution.Foreground Initialization --------------------
|
|
412
|
-
PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::ExtendedExecution::Foreground");
|
|
413
|
-
|
|
414
468
|
|
|
415
|
-
|
|
416
|
-
= {PyModuleDef_HEAD_INIT,
|
|
417
|
-
"_winrt_windows_applicationmodel_extendedexecution_foreground",
|
|
418
|
-
module_doc,
|
|
419
|
-
0,
|
|
420
|
-
nullptr,
|
|
421
|
-
nullptr,
|
|
422
|
-
nullptr,
|
|
423
|
-
nullptr,
|
|
424
|
-
nullptr};
|
|
469
|
+
PyDoc_STRVAR(module_doc, "Windows.ApplicationModel.ExtendedExecution.Foreground");
|
|
425
470
|
|
|
471
|
+
static PyModuleDef module_def = {
|
|
472
|
+
PyModuleDef_HEAD_INIT,
|
|
473
|
+
"_winrt_windows_applicationmodel_extendedexecution_foreground",
|
|
474
|
+
module_doc,
|
|
475
|
+
0,
|
|
476
|
+
nullptr,
|
|
477
|
+
nullptr,
|
|
478
|
+
nullptr,
|
|
479
|
+
nullptr,
|
|
480
|
+
nullptr};
|
|
426
481
|
} // py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
|
|
427
482
|
|
|
428
483
|
PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_extendedexecution_foreground(void) noexcept
|
|
@@ -454,12 +509,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_extendedexecution_foregrou
|
|
|
454
509
|
return nullptr;
|
|
455
510
|
}
|
|
456
511
|
|
|
457
|
-
|
|
512
|
+
py::pytype_handle ExtendedExecutionForegroundRevokedEventArgs_type{py::register_python_type(module.get(), &type_spec_ExtendedExecutionForegroundRevokedEventArgs, object_bases.get(), nullptr)};
|
|
513
|
+
if (!ExtendedExecutionForegroundRevokedEventArgs_type)
|
|
458
514
|
{
|
|
459
515
|
return nullptr;
|
|
460
516
|
}
|
|
461
517
|
|
|
462
|
-
|
|
518
|
+
py::pytype_handle ExtendedExecutionForegroundSession_type{py::register_python_type(module.get(), &type_spec_ExtendedExecutionForegroundSession, object_bases.get(), nullptr)};
|
|
519
|
+
if (!ExtendedExecutionForegroundSession_type)
|
|
463
520
|
{
|
|
464
521
|
return nullptr;
|
|
465
522
|
}
|
|
@@ -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.foreground import ExtendedExecutionForegroundReason, ExtendedExecutionForegroundResult, ExtendedExecutionForegroundRevokedReason
|
|
15
15
|
|
|
@@ -28,11 +28,11 @@ class ExtendedExecutionForegroundSession(winrt.system.Object):
|
|
|
28
28
|
def __exit__(self, *args) -> None: ...
|
|
29
29
|
@staticmethod
|
|
30
30
|
def _from(obj: winrt.system.Object, /) -> ExtendedExecutionForegroundSession: ...
|
|
31
|
-
def __new__(cls: typing.Type[ExtendedExecutionForegroundSession]) -> ExtendedExecutionForegroundSession
|
|
31
|
+
def __new__(cls: typing.Type[ExtendedExecutionForegroundSession]) -> ExtendedExecutionForegroundSession: ...
|
|
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[ExtendedExecutionForegroundResult]: ...
|
|
34
|
+
def add_revoked(self, handler: windows_foundation.TypedEventHandler[winrt.system.Object, ExtendedExecutionForegroundRevokedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
|
|
35
|
+
def remove_revoked(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
|
|
36
36
|
@_property
|
|
37
37
|
def reason(self) -> ExtendedExecutionForegroundReason: ...
|
|
38
38
|
@reason.setter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: winrt-Windows.ApplicationModel.ExtendedExecution.Foreground
|
|
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
|