winrt-Windows.ApplicationModel.ExtendedExecution 2.0.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/PKG-INFO +22 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/README.md +7 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/all-requirements.txt +3 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/py.Windows.ApplicationModel.ExtendedExecution.cpp +517 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/pyproject.toml +43 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/pywinrt-version.txt +1 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/requirements.txt +3 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/setup.cfg +4 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/setup.py +17 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt/_winrt_windows_applicationmodel_extendedexecution.pyi +46 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt/windows/applicationmodel/extendedexecution/__init__.py +30 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/PKG-INFO +22 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/SOURCES.txt +14 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/dependency_links.txt +1 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/requires.txt +4 -0
- winrt-Windows.ApplicationModel.ExtendedExecution-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.ApplicationModel.ExtendedExecution
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/pywrint/pywrinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Python: <3.13,>=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
|
|
16
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
17
|
+
|
|
18
|
+
# winrt-Windows.ApplicationModel.ExtendedExecution
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.ExtendedExecution` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.applicationmodel.extendedexecution` module.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.ApplicationModel.ExtendedExecution
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.ExtendedExecution` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.applicationmodel.extendedexecution` module.
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
#include "py.Windows.ApplicationModel.ExtendedExecution.h"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
namespace py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
7
|
+
{
|
|
8
|
+
// ----- ExtendedExecutionRevokedEventArgs class --------------------
|
|
9
|
+
|
|
10
|
+
static PyObject* _new_ExtendedExecutionRevokedEventArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
11
|
+
{
|
|
12
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs>::type_name);
|
|
13
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs>::type_name);
|
|
14
|
+
return nullptr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static void _dealloc_ExtendedExecutionRevokedEventArgs(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs* self) noexcept
|
|
18
|
+
{
|
|
19
|
+
auto tp = Py_TYPE(self);
|
|
20
|
+
std::destroy_at(&self->obj);
|
|
21
|
+
tp->tp_free(self);
|
|
22
|
+
Py_DECREF(tp);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
static PyObject* ExtendedExecutionRevokedEventArgs_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs* self, void* /*unused*/) noexcept
|
|
26
|
+
{
|
|
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
|
+
try
|
|
34
|
+
{
|
|
35
|
+
return py::convert(self->obj.Reason());
|
|
36
|
+
}
|
|
37
|
+
catch (...)
|
|
38
|
+
{
|
|
39
|
+
py::to_PyErr();
|
|
40
|
+
return nullptr;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static PyObject* _assign_array_ExtendedExecutionRevokedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
45
|
+
{
|
|
46
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs>>();
|
|
47
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
48
|
+
{
|
|
49
|
+
return nullptr;
|
|
50
|
+
}
|
|
51
|
+
Py_RETURN_NONE;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static PyObject* _from_ExtendedExecutionRevokedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
55
|
+
{
|
|
56
|
+
try
|
|
57
|
+
{
|
|
58
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
59
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs>());
|
|
60
|
+
}
|
|
61
|
+
catch (...)
|
|
62
|
+
{
|
|
63
|
+
py::to_PyErr();
|
|
64
|
+
return nullptr;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static PyMethodDef _methods_ExtendedExecutionRevokedEventArgs[] = {
|
|
69
|
+
{ "_assign_array_", _assign_array_ExtendedExecutionRevokedEventArgs, METH_O | METH_STATIC, nullptr },
|
|
70
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_ExtendedExecutionRevokedEventArgs), METH_O | METH_STATIC, nullptr },
|
|
71
|
+
{ }
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
static PyGetSetDef _getset_ExtendedExecutionRevokedEventArgs[] = {
|
|
75
|
+
{ "reason", reinterpret_cast<getter>(ExtendedExecutionRevokedEventArgs_get_Reason), nullptr, nullptr, nullptr },
|
|
76
|
+
{ }
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
static PyType_Slot _type_slots_ExtendedExecutionRevokedEventArgs[] =
|
|
80
|
+
{
|
|
81
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionRevokedEventArgs) },
|
|
82
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionRevokedEventArgs) },
|
|
83
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionRevokedEventArgs) },
|
|
84
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionRevokedEventArgs) },
|
|
85
|
+
{ },
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
static PyType_Spec type_spec_ExtendedExecutionRevokedEventArgs =
|
|
89
|
+
{
|
|
90
|
+
"winrt._winrt_windows_applicationmodel_extendedexecution.ExtendedExecutionRevokedEventArgs",
|
|
91
|
+
sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs),
|
|
92
|
+
0,
|
|
93
|
+
Py_TPFLAGS_DEFAULT,
|
|
94
|
+
_type_slots_ExtendedExecutionRevokedEventArgs
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// ----- ExtendedExecutionSession class --------------------
|
|
98
|
+
|
|
99
|
+
static PyObject* _new_ExtendedExecutionSession(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
|
|
100
|
+
{
|
|
101
|
+
if (kwds != nullptr)
|
|
102
|
+
{
|
|
103
|
+
py::set_invalid_kwd_args_error();
|
|
104
|
+
return nullptr;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
auto arg_count = PyTuple_Size(args);
|
|
108
|
+
if (arg_count == 0)
|
|
109
|
+
{
|
|
110
|
+
try
|
|
111
|
+
{
|
|
112
|
+
winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession instance{ };
|
|
113
|
+
return py::wrap(instance, type);
|
|
114
|
+
}
|
|
115
|
+
catch (...)
|
|
116
|
+
{
|
|
117
|
+
py::to_PyErr();
|
|
118
|
+
return nullptr;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
124
|
+
return nullptr;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static void _dealloc_ExtendedExecutionSession(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self) noexcept
|
|
129
|
+
{
|
|
130
|
+
auto tp = Py_TYPE(self);
|
|
131
|
+
std::destroy_at(&self->obj);
|
|
132
|
+
tp->tp_free(self);
|
|
133
|
+
Py_DECREF(tp);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
static PyObject* ExtendedExecutionSession_Close(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* args) noexcept
|
|
137
|
+
{
|
|
138
|
+
auto arg_count = PyTuple_Size(args);
|
|
139
|
+
|
|
140
|
+
if (arg_count == 0)
|
|
141
|
+
{
|
|
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
|
+
try
|
|
149
|
+
{
|
|
150
|
+
self->obj.Close();
|
|
151
|
+
Py_RETURN_NONE;
|
|
152
|
+
}
|
|
153
|
+
catch (...)
|
|
154
|
+
{
|
|
155
|
+
py::to_PyErr();
|
|
156
|
+
return nullptr;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else
|
|
160
|
+
{
|
|
161
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
162
|
+
return nullptr;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
static PyObject* ExtendedExecutionSession_RequestExtensionAsync(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* args) noexcept
|
|
167
|
+
{
|
|
168
|
+
auto arg_count = PyTuple_Size(args);
|
|
169
|
+
|
|
170
|
+
if (arg_count == 0)
|
|
171
|
+
{
|
|
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
|
+
try
|
|
179
|
+
{
|
|
180
|
+
return py::convert(self->obj.RequestExtensionAsync());
|
|
181
|
+
}
|
|
182
|
+
catch (...)
|
|
183
|
+
{
|
|
184
|
+
py::to_PyErr();
|
|
185
|
+
return nullptr;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else
|
|
189
|
+
{
|
|
190
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
191
|
+
return nullptr;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
static PyObject* ExtendedExecutionSession_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, void* /*unused*/) noexcept
|
|
196
|
+
{
|
|
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
|
+
try
|
|
204
|
+
{
|
|
205
|
+
return py::convert(self->obj.Reason());
|
|
206
|
+
}
|
|
207
|
+
catch (...)
|
|
208
|
+
{
|
|
209
|
+
py::to_PyErr();
|
|
210
|
+
return nullptr;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static int ExtendedExecutionSession_put_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
215
|
+
{
|
|
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
|
+
if (arg == nullptr)
|
|
223
|
+
{
|
|
224
|
+
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
225
|
+
return -1;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
try
|
|
229
|
+
{
|
|
230
|
+
auto param0 = py::convert_to<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionReason>(arg);
|
|
231
|
+
|
|
232
|
+
self->obj.Reason(param0);
|
|
233
|
+
return 0;
|
|
234
|
+
}
|
|
235
|
+
catch (...)
|
|
236
|
+
{
|
|
237
|
+
py::to_PyErr();
|
|
238
|
+
return -1;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
static PyObject* ExtendedExecutionSession_get_PercentProgress(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, void* /*unused*/) noexcept
|
|
243
|
+
{
|
|
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
|
+
try
|
|
251
|
+
{
|
|
252
|
+
return py::convert(self->obj.PercentProgress());
|
|
253
|
+
}
|
|
254
|
+
catch (...)
|
|
255
|
+
{
|
|
256
|
+
py::to_PyErr();
|
|
257
|
+
return nullptr;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
static int ExtendedExecutionSession_put_PercentProgress(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
262
|
+
{
|
|
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
|
+
if (arg == nullptr)
|
|
270
|
+
{
|
|
271
|
+
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
272
|
+
return -1;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
try
|
|
276
|
+
{
|
|
277
|
+
auto param0 = py::convert_to<uint32_t>(arg);
|
|
278
|
+
|
|
279
|
+
self->obj.PercentProgress(param0);
|
|
280
|
+
return 0;
|
|
281
|
+
}
|
|
282
|
+
catch (...)
|
|
283
|
+
{
|
|
284
|
+
py::to_PyErr();
|
|
285
|
+
return -1;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
static PyObject* ExtendedExecutionSession_get_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, void* /*unused*/) noexcept
|
|
290
|
+
{
|
|
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
|
+
try
|
|
298
|
+
{
|
|
299
|
+
return py::convert(self->obj.Description());
|
|
300
|
+
}
|
|
301
|
+
catch (...)
|
|
302
|
+
{
|
|
303
|
+
py::to_PyErr();
|
|
304
|
+
return nullptr;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
static int ExtendedExecutionSession_put_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg, void* /*unused*/) noexcept
|
|
309
|
+
{
|
|
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
|
+
if (arg == nullptr)
|
|
317
|
+
{
|
|
318
|
+
PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
|
|
319
|
+
return -1;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
try
|
|
323
|
+
{
|
|
324
|
+
auto param0 = py::convert_to<winrt::hstring>(arg);
|
|
325
|
+
|
|
326
|
+
self->obj.Description(param0);
|
|
327
|
+
return 0;
|
|
328
|
+
}
|
|
329
|
+
catch (...)
|
|
330
|
+
{
|
|
331
|
+
py::to_PyErr();
|
|
332
|
+
return -1;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
static PyObject* ExtendedExecutionSession_add_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg) noexcept
|
|
337
|
+
{
|
|
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
|
+
try
|
|
345
|
+
{
|
|
346
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionRevokedEventArgs>>(arg);
|
|
347
|
+
|
|
348
|
+
return py::convert(self->obj.Revoked(param0));
|
|
349
|
+
}
|
|
350
|
+
catch (...)
|
|
351
|
+
{
|
|
352
|
+
py::to_PyErr();
|
|
353
|
+
return nullptr;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
static PyObject* ExtendedExecutionSession_remove_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* arg) noexcept
|
|
358
|
+
{
|
|
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
|
+
try
|
|
366
|
+
{
|
|
367
|
+
auto param0 = py::convert_to<winrt::event_token>(arg);
|
|
368
|
+
|
|
369
|
+
self->obj.Revoked(param0);
|
|
370
|
+
Py_RETURN_NONE;
|
|
371
|
+
}
|
|
372
|
+
catch (...)
|
|
373
|
+
{
|
|
374
|
+
py::to_PyErr();
|
|
375
|
+
return nullptr;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
static PyObject* _assign_array_ExtendedExecutionSession(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
380
|
+
{
|
|
381
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession>>();
|
|
382
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
383
|
+
{
|
|
384
|
+
return nullptr;
|
|
385
|
+
}
|
|
386
|
+
Py_RETURN_NONE;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
static PyObject* _from_ExtendedExecutionSession(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
390
|
+
{
|
|
391
|
+
try
|
|
392
|
+
{
|
|
393
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
394
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession>());
|
|
395
|
+
}
|
|
396
|
+
catch (...)
|
|
397
|
+
{
|
|
398
|
+
py::to_PyErr();
|
|
399
|
+
return nullptr;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
static PyObject* _enter_ExtendedExecutionSession(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* /*unused*/) noexcept
|
|
404
|
+
{
|
|
405
|
+
return Py_NewRef(self);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
static PyObject* _exit_ExtendedExecutionSession(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession* self, PyObject* /*unused*/) noexcept
|
|
409
|
+
{
|
|
410
|
+
try
|
|
411
|
+
{
|
|
412
|
+
self->obj.Close();
|
|
413
|
+
Py_RETURN_FALSE;
|
|
414
|
+
}
|
|
415
|
+
catch (...)
|
|
416
|
+
{
|
|
417
|
+
py::to_PyErr();
|
|
418
|
+
return nullptr;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
static PyMethodDef _methods_ExtendedExecutionSession[] = {
|
|
423
|
+
{ "close", reinterpret_cast<PyCFunction>(ExtendedExecutionSession_Close), METH_VARARGS, nullptr },
|
|
424
|
+
{ "request_extension_async", reinterpret_cast<PyCFunction>(ExtendedExecutionSession_RequestExtensionAsync), METH_VARARGS, nullptr },
|
|
425
|
+
{ "add_revoked", reinterpret_cast<PyCFunction>(ExtendedExecutionSession_add_Revoked), METH_O, nullptr },
|
|
426
|
+
{ "remove_revoked", reinterpret_cast<PyCFunction>(ExtendedExecutionSession_remove_Revoked), METH_O, nullptr },
|
|
427
|
+
{ "_assign_array_", _assign_array_ExtendedExecutionSession, METH_O | METH_STATIC, nullptr },
|
|
428
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_ExtendedExecutionSession), METH_O | METH_STATIC, nullptr },
|
|
429
|
+
{ "__enter__", reinterpret_cast<PyCFunction>(_enter_ExtendedExecutionSession), METH_NOARGS, nullptr },
|
|
430
|
+
{ "__exit__", reinterpret_cast<PyCFunction>(_exit_ExtendedExecutionSession), METH_VARARGS, nullptr },
|
|
431
|
+
{ }
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
static PyGetSetDef _getset_ExtendedExecutionSession[] = {
|
|
435
|
+
{ "reason", reinterpret_cast<getter>(ExtendedExecutionSession_get_Reason), reinterpret_cast<setter>(ExtendedExecutionSession_put_Reason), nullptr, nullptr },
|
|
436
|
+
{ "percent_progress", reinterpret_cast<getter>(ExtendedExecutionSession_get_PercentProgress), reinterpret_cast<setter>(ExtendedExecutionSession_put_PercentProgress), nullptr, nullptr },
|
|
437
|
+
{ "description", reinterpret_cast<getter>(ExtendedExecutionSession_get_Description), reinterpret_cast<setter>(ExtendedExecutionSession_put_Description), nullptr, nullptr },
|
|
438
|
+
{ }
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
static PyType_Slot _type_slots_ExtendedExecutionSession[] =
|
|
442
|
+
{
|
|
443
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionSession) },
|
|
444
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionSession) },
|
|
445
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionSession) },
|
|
446
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionSession) },
|
|
447
|
+
{ },
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
static PyType_Spec type_spec_ExtendedExecutionSession =
|
|
451
|
+
{
|
|
452
|
+
"winrt._winrt_windows_applicationmodel_extendedexecution.ExtendedExecutionSession",
|
|
453
|
+
sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::ExtendedExecutionSession),
|
|
454
|
+
0,
|
|
455
|
+
Py_TPFLAGS_DEFAULT,
|
|
456
|
+
_type_slots_ExtendedExecutionSession
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
// ----- Windows.ApplicationModel.ExtendedExecution Initialization --------------------
|
|
460
|
+
PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::ExtendedExecution");
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
static PyModuleDef module_def
|
|
464
|
+
= {PyModuleDef_HEAD_INIT,
|
|
465
|
+
"_winrt_windows_applicationmodel_extendedexecution",
|
|
466
|
+
module_doc,
|
|
467
|
+
0,
|
|
468
|
+
nullptr,
|
|
469
|
+
nullptr,
|
|
470
|
+
nullptr,
|
|
471
|
+
nullptr,
|
|
472
|
+
nullptr};
|
|
473
|
+
|
|
474
|
+
} // py::cpp::Windows::ApplicationModel::ExtendedExecution
|
|
475
|
+
|
|
476
|
+
PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_extendedexecution(void) noexcept
|
|
477
|
+
{
|
|
478
|
+
using namespace py::cpp::Windows::ApplicationModel::ExtendedExecution;
|
|
479
|
+
|
|
480
|
+
if (py::import_winrt_runtime() == -1)
|
|
481
|
+
{
|
|
482
|
+
return nullptr;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
486
|
+
|
|
487
|
+
if (!module)
|
|
488
|
+
{
|
|
489
|
+
return nullptr;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
auto object_type = py::get_object_type();
|
|
493
|
+
if (!object_type)
|
|
494
|
+
{
|
|
495
|
+
return nullptr;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
499
|
+
|
|
500
|
+
if (!object_bases)
|
|
501
|
+
{
|
|
502
|
+
return nullptr;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
if (py::register_python_type(module.get(), &type_spec_ExtendedExecutionRevokedEventArgs, object_bases.get(), nullptr) == -1)
|
|
506
|
+
{
|
|
507
|
+
return nullptr;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
if (py::register_python_type(module.get(), &type_spec_ExtendedExecutionSession, object_bases.get(), nullptr) == -1)
|
|
511
|
+
{
|
|
512
|
+
return nullptr;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
return module.detach();
|
|
517
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
|
|
5
|
+
build-backend = "setuptools.build_meta"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Windows.ApplicationModel.ExtendedExecution"
|
|
9
|
+
description = "Python projection of Windows Runtime (WinRT) APIs"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Operating System :: Microsoft :: Windows",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
]
|
|
18
|
+
dynamic = ["version", "dependencies", "optional-dependencies"]
|
|
19
|
+
requires-python = ">=3.9,<3.13"
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
# Homepage = "https://github.com/pywrint/pywrinrt"
|
|
23
|
+
# Documentation = "https://readthedocs.org"
|
|
24
|
+
Repository = "https://github.com/pywrint/pywrinrt"
|
|
25
|
+
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
|
|
26
|
+
|
|
27
|
+
[tool.setuptools.dynamic]
|
|
28
|
+
version = { file = "pywinrt-version.txt" }
|
|
29
|
+
dependencies = { file = "requirements.txt" }
|
|
30
|
+
optional-dependencies.all = { file = "all-requirements.txt" }
|
|
31
|
+
|
|
32
|
+
[tool.cibuildwheel]
|
|
33
|
+
# use local winrt-sdk build dependency
|
|
34
|
+
environment = { PYTHONPATH="../winrt-sdk/src" }
|
|
35
|
+
# don't install winrt-sdk from PyPI
|
|
36
|
+
build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
37
|
+
# don't build for PyPy
|
|
38
|
+
skip = "pp*"
|
|
39
|
+
# suppress warnings about ARM64 testing
|
|
40
|
+
test-skip = "*-win_arm64"
|
|
41
|
+
|
|
42
|
+
[tool.cibuildwheel.windows]
|
|
43
|
+
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.0.0-beta.1
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
from setuptools import Extension, setup
|
|
4
|
+
from winrt_sdk import get_include_dirs
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
ext_modules=[
|
|
8
|
+
Extension(
|
|
9
|
+
"winrt._winrt_windows_applicationmodel_extendedexecution",
|
|
10
|
+
sources=["py.Windows.ApplicationModel.ExtendedExecution.cpp"],
|
|
11
|
+
include_dirs=get_include_dirs(),
|
|
12
|
+
extra_compile_args=["/std:c++20", "/permissive-"],
|
|
13
|
+
libraries=["windowsapp"],
|
|
14
|
+
)
|
|
15
|
+
],
|
|
16
|
+
package_data={"winrt": ["*.pyi"]},
|
|
17
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
import sys
|
|
5
|
+
import types
|
|
6
|
+
import typing
|
|
7
|
+
import uuid as _uuid
|
|
8
|
+
from builtins import property as _property
|
|
9
|
+
|
|
10
|
+
import winrt._winrt
|
|
11
|
+
import winrt.system
|
|
12
|
+
import winrt.windows.foundation
|
|
13
|
+
|
|
14
|
+
from winrt.windows.applicationmodel.extendedexecution import ExtendedExecutionReason, ExtendedExecutionResult, ExtendedExecutionRevokedReason
|
|
15
|
+
|
|
16
|
+
Self = typing.TypeVar('Self')
|
|
17
|
+
|
|
18
|
+
class ExtendedExecutionRevokedEventArgs(winrt.system.Object):
|
|
19
|
+
@staticmethod
|
|
20
|
+
def _from(obj: winrt.system.Object, /) -> ExtendedExecutionRevokedEventArgs: ...
|
|
21
|
+
@_property
|
|
22
|
+
def reason(self) -> ExtendedExecutionRevokedReason: ...
|
|
23
|
+
|
|
24
|
+
class ExtendedExecutionSession(winrt.system.Object):
|
|
25
|
+
def __enter__(self: Self) -> Self: ...
|
|
26
|
+
def __exit__(self, *args) -> None: ...
|
|
27
|
+
@staticmethod
|
|
28
|
+
def _from(obj: winrt.system.Object, /) -> ExtendedExecutionSession: ...
|
|
29
|
+
def __new__(cls: typing.Type[ExtendedExecutionSession]) -> ExtendedExecutionSession:...
|
|
30
|
+
def close(self) -> None: ...
|
|
31
|
+
def request_extension_async(self) -> winrt.windows.foundation.IAsyncOperation[ExtendedExecutionResult]: ...
|
|
32
|
+
def add_revoked(self, handler: winrt.windows.foundation.TypedEventHandler[winrt.system.Object, ExtendedExecutionRevokedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
|
|
33
|
+
def remove_revoked(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
|
|
34
|
+
@_property
|
|
35
|
+
def reason(self) -> ExtendedExecutionReason: ...
|
|
36
|
+
@reason.setter
|
|
37
|
+
def reason(self, value: ExtendedExecutionReason) -> None: ...
|
|
38
|
+
@_property
|
|
39
|
+
def percent_progress(self) -> winrt.system.UInt32: ...
|
|
40
|
+
@percent_progress.setter
|
|
41
|
+
def percent_progress(self, value: winrt.system.UInt32) -> None: ...
|
|
42
|
+
@_property
|
|
43
|
+
def description(self) -> str: ...
|
|
44
|
+
@description.setter
|
|
45
|
+
def description(self, value: str) -> None: ...
|
|
46
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
|
|
2
|
+
|
|
3
|
+
import enum
|
|
4
|
+
|
|
5
|
+
import winrt.system
|
|
6
|
+
from winrt import _winrt_windows_applicationmodel_extendedexecution
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"ExtendedExecutionReason",
|
|
10
|
+
"ExtendedExecutionResult",
|
|
11
|
+
"ExtendedExecutionRevokedReason",
|
|
12
|
+
"ExtendedExecutionRevokedEventArgs",
|
|
13
|
+
"ExtendedExecutionSession",
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
class ExtendedExecutionReason(enum.IntEnum):
|
|
17
|
+
UNSPECIFIED = 0
|
|
18
|
+
LOCATION_TRACKING = 1
|
|
19
|
+
SAVING_DATA = 2
|
|
20
|
+
|
|
21
|
+
class ExtendedExecutionResult(enum.IntEnum):
|
|
22
|
+
ALLOWED = 0
|
|
23
|
+
DENIED = 1
|
|
24
|
+
|
|
25
|
+
class ExtendedExecutionRevokedReason(enum.IntEnum):
|
|
26
|
+
RESUMED = 0
|
|
27
|
+
SYSTEM_POLICY = 1
|
|
28
|
+
|
|
29
|
+
ExtendedExecutionRevokedEventArgs = _winrt_windows_applicationmodel_extendedexecution.ExtendedExecutionRevokedEventArgs
|
|
30
|
+
ExtendedExecutionSession = _winrt_windows_applicationmodel_extendedexecution.ExtendedExecutionSession
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.ApplicationModel.ExtendedExecution
|
|
3
|
+
Version: 2.0.0b1
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Repository, https://github.com/pywrint/pywrinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
8
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Requires-Python: <3.13,>=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Provides-Extra: all
|
|
15
|
+
|
|
16
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
17
|
+
|
|
18
|
+
# winrt-Windows.ApplicationModel.ExtendedExecution
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.ExtendedExecution` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.applicationmodel.extendedexecution` module.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
all-requirements.txt
|
|
3
|
+
py.Windows.ApplicationModel.ExtendedExecution.cpp
|
|
4
|
+
pyproject.toml
|
|
5
|
+
pywinrt-version.txt
|
|
6
|
+
requirements.txt
|
|
7
|
+
setup.py
|
|
8
|
+
winrt/_winrt_windows_applicationmodel_extendedexecution.pyi
|
|
9
|
+
winrt/windows/applicationmodel/extendedexecution/__init__.py
|
|
10
|
+
winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/PKG-INFO
|
|
11
|
+
winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/SOURCES.txt
|
|
12
|
+
winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/dependency_links.txt
|
|
13
|
+
winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/requires.txt
|
|
14
|
+
winrt_Windows.ApplicationModel.ExtendedExecution.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|