winrt-Windows.ApplicationModel.ExtendedExecution.Foreground 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.
Files changed (16) hide show
  1. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/PKG-INFO +22 -0
  2. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/README.md +7 -0
  3. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/all-requirements.txt +3 -0
  4. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/py.Windows.ApplicationModel.ExtendedExecution.Foreground.cpp +469 -0
  5. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/pyproject.toml +43 -0
  6. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/pywinrt-version.txt +1 -0
  7. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/requirements.txt +3 -0
  8. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/setup.cfg +4 -0
  9. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/setup.py +17 -0
  10. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt/_winrt_windows_applicationmodel_extendedexecution_foreground.pyi +42 -0
  11. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt/windows/applicationmodel/extendedexecution/foreground/__init__.py +31 -0
  12. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/PKG-INFO +22 -0
  13. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/SOURCES.txt +14 -0
  14. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/dependency_links.txt +1 -0
  15. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/requires.txt +4 -0
  16. winrt-Windows.ApplicationModel.ExtendedExecution.Foreground-2.0.0b1/winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.ApplicationModel.ExtendedExecution.Foreground
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.Foreground
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.ExtendedExecution.Foreground` namespace.
21
+
22
+ This package provides the `winrt.windows.applicationmodel.extendedexecution.foreground` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.ApplicationModel.ExtendedExecution.Foreground
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.ExtendedExecution.Foreground` namespace.
6
+
7
+ This package provides the `winrt.windows.applicationmodel.extendedexecution.foreground` module.
@@ -0,0 +1,3 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
@@ -0,0 +1,469 @@
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.Foreground.h"
4
+
5
+
6
+ namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
7
+ {
8
+ // ----- ExtendedExecutionForegroundRevokedEventArgs class --------------------
9
+
10
+ static PyObject* _new_ExtendedExecutionForegroundRevokedEventArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
11
+ {
12
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs>::type_name);
13
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs>::type_name);
14
+ return nullptr;
15
+ }
16
+
17
+ static void _dealloc_ExtendedExecutionForegroundRevokedEventArgs(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs* 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* ExtendedExecutionForegroundRevokedEventArgs_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs* self, void* /*unused*/) noexcept
26
+ {
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
+ 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_ExtendedExecutionForegroundRevokedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
45
+ {
46
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs>>();
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_ExtendedExecutionForegroundRevokedEventArgs(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::Foreground::ExtendedExecutionForegroundRevokedEventArgs>());
60
+ }
61
+ catch (...)
62
+ {
63
+ py::to_PyErr();
64
+ return nullptr;
65
+ }
66
+ }
67
+
68
+ static PyMethodDef _methods_ExtendedExecutionForegroundRevokedEventArgs[] = {
69
+ { "_assign_array_", _assign_array_ExtendedExecutionForegroundRevokedEventArgs, METH_O | METH_STATIC, nullptr },
70
+ { "_from", reinterpret_cast<PyCFunction>(_from_ExtendedExecutionForegroundRevokedEventArgs), METH_O | METH_STATIC, nullptr },
71
+ { }
72
+ };
73
+
74
+ static PyGetSetDef _getset_ExtendedExecutionForegroundRevokedEventArgs[] = {
75
+ { "reason", reinterpret_cast<getter>(ExtendedExecutionForegroundRevokedEventArgs_get_Reason), nullptr, nullptr, nullptr },
76
+ { }
77
+ };
78
+
79
+ static PyType_Slot _type_slots_ExtendedExecutionForegroundRevokedEventArgs[] =
80
+ {
81
+ { Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionForegroundRevokedEventArgs) },
82
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionForegroundRevokedEventArgs) },
83
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionForegroundRevokedEventArgs) },
84
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionForegroundRevokedEventArgs) },
85
+ { },
86
+ };
87
+
88
+ static PyType_Spec type_spec_ExtendedExecutionForegroundRevokedEventArgs =
89
+ {
90
+ "winrt._winrt_windows_applicationmodel_extendedexecution_foreground.ExtendedExecutionForegroundRevokedEventArgs",
91
+ sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs),
92
+ 0,
93
+ Py_TPFLAGS_DEFAULT,
94
+ _type_slots_ExtendedExecutionForegroundRevokedEventArgs
95
+ };
96
+
97
+ // ----- ExtendedExecutionForegroundSession class --------------------
98
+
99
+ static PyObject* _new_ExtendedExecutionForegroundSession(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::Foreground::ExtendedExecutionForegroundSession 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_ExtendedExecutionForegroundSession(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* 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* ExtendedExecutionForegroundSession_Close(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* 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.Foreground.ExtendedExecutionForegroundSession", 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* ExtendedExecutionForegroundSession_RequestExtensionAsync(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* 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.Foreground.ExtendedExecutionForegroundSession", 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* ExtendedExecutionForegroundSession_get_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, void* /*unused*/) noexcept
196
+ {
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
+ 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 ExtendedExecutionForegroundSession_put_Reason(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg, void* /*unused*/) noexcept
215
+ {
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
+ 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::Foreground::ExtendedExecutionForegroundReason>(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* ExtendedExecutionForegroundSession_get_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, void* /*unused*/) noexcept
243
+ {
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
+ try
251
+ {
252
+ return py::convert(self->obj.Description());
253
+ }
254
+ catch (...)
255
+ {
256
+ py::to_PyErr();
257
+ return nullptr;
258
+ }
259
+ }
260
+
261
+ static int ExtendedExecutionForegroundSession_put_Description(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg, void* /*unused*/) noexcept
262
+ {
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
+ 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<winrt::hstring>(arg);
278
+
279
+ self->obj.Description(param0);
280
+ return 0;
281
+ }
282
+ catch (...)
283
+ {
284
+ py::to_PyErr();
285
+ return -1;
286
+ }
287
+ }
288
+
289
+ static PyObject* ExtendedExecutionForegroundSession_add_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg) noexcept
290
+ {
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
+ try
298
+ {
299
+ auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::Foundation::IInspectable, winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundRevokedEventArgs>>(arg);
300
+
301
+ return py::convert(self->obj.Revoked(param0));
302
+ }
303
+ catch (...)
304
+ {
305
+ py::to_PyErr();
306
+ return nullptr;
307
+ }
308
+ }
309
+
310
+ static PyObject* ExtendedExecutionForegroundSession_remove_Revoked(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* arg) noexcept
311
+ {
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
+ try
319
+ {
320
+ auto param0 = py::convert_to<winrt::event_token>(arg);
321
+
322
+ self->obj.Revoked(param0);
323
+ Py_RETURN_NONE;
324
+ }
325
+ catch (...)
326
+ {
327
+ py::to_PyErr();
328
+ return nullptr;
329
+ }
330
+ }
331
+
332
+ static PyObject* _assign_array_ExtendedExecutionForegroundSession(PyObject* /*unused*/, PyObject* arg) noexcept
333
+ {
334
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession>>();
335
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
336
+ {
337
+ return nullptr;
338
+ }
339
+ Py_RETURN_NONE;
340
+ }
341
+
342
+ static PyObject* _from_ExtendedExecutionForegroundSession(PyObject* /*unused*/, PyObject* arg) noexcept
343
+ {
344
+ try
345
+ {
346
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
347
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession>());
348
+ }
349
+ catch (...)
350
+ {
351
+ py::to_PyErr();
352
+ return nullptr;
353
+ }
354
+ }
355
+
356
+ static PyObject* _enter_ExtendedExecutionForegroundSession(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* /*unused*/) noexcept
357
+ {
358
+ return Py_NewRef(self);
359
+ }
360
+
361
+ static PyObject* _exit_ExtendedExecutionForegroundSession(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession* self, PyObject* /*unused*/) noexcept
362
+ {
363
+ try
364
+ {
365
+ self->obj.Close();
366
+ Py_RETURN_FALSE;
367
+ }
368
+ catch (...)
369
+ {
370
+ py::to_PyErr();
371
+ return nullptr;
372
+ }
373
+ }
374
+
375
+ static PyMethodDef _methods_ExtendedExecutionForegroundSession[] = {
376
+ { "close", reinterpret_cast<PyCFunction>(ExtendedExecutionForegroundSession_Close), METH_VARARGS, nullptr },
377
+ { "request_extension_async", reinterpret_cast<PyCFunction>(ExtendedExecutionForegroundSession_RequestExtensionAsync), METH_VARARGS, nullptr },
378
+ { "add_revoked", reinterpret_cast<PyCFunction>(ExtendedExecutionForegroundSession_add_Revoked), METH_O, nullptr },
379
+ { "remove_revoked", reinterpret_cast<PyCFunction>(ExtendedExecutionForegroundSession_remove_Revoked), METH_O, nullptr },
380
+ { "_assign_array_", _assign_array_ExtendedExecutionForegroundSession, METH_O | METH_STATIC, nullptr },
381
+ { "_from", reinterpret_cast<PyCFunction>(_from_ExtendedExecutionForegroundSession), METH_O | METH_STATIC, nullptr },
382
+ { "__enter__", reinterpret_cast<PyCFunction>(_enter_ExtendedExecutionForegroundSession), METH_NOARGS, nullptr },
383
+ { "__exit__", reinterpret_cast<PyCFunction>(_exit_ExtendedExecutionForegroundSession), METH_VARARGS, nullptr },
384
+ { }
385
+ };
386
+
387
+ static PyGetSetDef _getset_ExtendedExecutionForegroundSession[] = {
388
+ { "reason", reinterpret_cast<getter>(ExtendedExecutionForegroundSession_get_Reason), reinterpret_cast<setter>(ExtendedExecutionForegroundSession_put_Reason), nullptr, nullptr },
389
+ { "description", reinterpret_cast<getter>(ExtendedExecutionForegroundSession_get_Description), reinterpret_cast<setter>(ExtendedExecutionForegroundSession_put_Description), nullptr, nullptr },
390
+ { }
391
+ };
392
+
393
+ static PyType_Slot _type_slots_ExtendedExecutionForegroundSession[] =
394
+ {
395
+ { Py_tp_new, reinterpret_cast<void*>(_new_ExtendedExecutionForegroundSession) },
396
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ExtendedExecutionForegroundSession) },
397
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_ExtendedExecutionForegroundSession) },
398
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_ExtendedExecutionForegroundSession) },
399
+ { },
400
+ };
401
+
402
+ static PyType_Spec type_spec_ExtendedExecutionForegroundSession =
403
+ {
404
+ "winrt._winrt_windows_applicationmodel_extendedexecution_foreground.ExtendedExecutionForegroundSession",
405
+ sizeof(py::wrapper::Windows::ApplicationModel::ExtendedExecution::Foreground::ExtendedExecutionForegroundSession),
406
+ 0,
407
+ Py_TPFLAGS_DEFAULT,
408
+ _type_slots_ExtendedExecutionForegroundSession
409
+ };
410
+
411
+ // ----- Windows.ApplicationModel.ExtendedExecution.Foreground Initialization --------------------
412
+ PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::ExtendedExecution::Foreground");
413
+
414
+
415
+ static PyModuleDef module_def
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};
425
+
426
+ } // py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground
427
+
428
+ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_extendedexecution_foreground(void) noexcept
429
+ {
430
+ using namespace py::cpp::Windows::ApplicationModel::ExtendedExecution::Foreground;
431
+
432
+ if (py::import_winrt_runtime() == -1)
433
+ {
434
+ return nullptr;
435
+ }
436
+
437
+ py::pyobj_handle module{PyModule_Create(&module_def)};
438
+
439
+ if (!module)
440
+ {
441
+ return nullptr;
442
+ }
443
+
444
+ auto object_type = py::get_object_type();
445
+ if (!object_type)
446
+ {
447
+ return nullptr;
448
+ }
449
+
450
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
451
+
452
+ if (!object_bases)
453
+ {
454
+ return nullptr;
455
+ }
456
+
457
+ if (py::register_python_type(module.get(), &type_spec_ExtendedExecutionForegroundRevokedEventArgs, object_bases.get(), nullptr) == -1)
458
+ {
459
+ return nullptr;
460
+ }
461
+
462
+ if (py::register_python_type(module.get(), &type_spec_ExtendedExecutionForegroundSession, object_bases.get(), nullptr) == -1)
463
+ {
464
+ return nullptr;
465
+ }
466
+
467
+
468
+ return module.detach();
469
+ }
@@ -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.Foreground"
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,3 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-runtime==2.0.0-beta.1
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -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_foreground",
10
+ sources=["py.Windows.ApplicationModel.ExtendedExecution.Foreground.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,42 @@
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.foreground import ExtendedExecutionForegroundReason, ExtendedExecutionForegroundResult, ExtendedExecutionForegroundRevokedReason
15
+
16
+ Self = typing.TypeVar('Self')
17
+
18
+ class ExtendedExecutionForegroundRevokedEventArgs(winrt.system.Object):
19
+ @staticmethod
20
+ def _from(obj: winrt.system.Object, /) -> ExtendedExecutionForegroundRevokedEventArgs: ...
21
+ @_property
22
+ def reason(self) -> ExtendedExecutionForegroundRevokedReason: ...
23
+
24
+ class ExtendedExecutionForegroundSession(winrt.system.Object):
25
+ def __enter__(self: Self) -> Self: ...
26
+ def __exit__(self, *args) -> None: ...
27
+ @staticmethod
28
+ def _from(obj: winrt.system.Object, /) -> ExtendedExecutionForegroundSession: ...
29
+ def __new__(cls: typing.Type[ExtendedExecutionForegroundSession]) -> ExtendedExecutionForegroundSession:...
30
+ def close(self) -> None: ...
31
+ def request_extension_async(self) -> winrt.windows.foundation.IAsyncOperation[ExtendedExecutionForegroundResult]: ...
32
+ def add_revoked(self, handler: winrt.windows.foundation.TypedEventHandler[winrt.system.Object, ExtendedExecutionForegroundRevokedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
33
+ def remove_revoked(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
34
+ @_property
35
+ def reason(self) -> ExtendedExecutionForegroundReason: ...
36
+ @reason.setter
37
+ def reason(self, value: ExtendedExecutionForegroundReason) -> None: ...
38
+ @_property
39
+ def description(self) -> str: ...
40
+ @description.setter
41
+ def description(self, value: str) -> None: ...
42
+
@@ -0,0 +1,31 @@
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_foreground
7
+
8
+ __all__ = [
9
+ "ExtendedExecutionForegroundReason",
10
+ "ExtendedExecutionForegroundResult",
11
+ "ExtendedExecutionForegroundRevokedReason",
12
+ "ExtendedExecutionForegroundRevokedEventArgs",
13
+ "ExtendedExecutionForegroundSession",
14
+ ]
15
+
16
+ class ExtendedExecutionForegroundReason(enum.IntEnum):
17
+ UNSPECIFIED = 0
18
+ SAVING_DATA = 1
19
+ BACKGROUND_AUDIO = 2
20
+ UNCONSTRAINED = 3
21
+
22
+ class ExtendedExecutionForegroundResult(enum.IntEnum):
23
+ ALLOWED = 0
24
+ DENIED = 1
25
+
26
+ class ExtendedExecutionForegroundRevokedReason(enum.IntEnum):
27
+ RESUMED = 0
28
+ SYSTEM_POLICY = 1
29
+
30
+ ExtendedExecutionForegroundRevokedEventArgs = _winrt_windows_applicationmodel_extendedexecution_foreground.ExtendedExecutionForegroundRevokedEventArgs
31
+ ExtendedExecutionForegroundSession = _winrt_windows_applicationmodel_extendedexecution_foreground.ExtendedExecutionForegroundSession
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.ApplicationModel.ExtendedExecution.Foreground
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.Foreground
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.ExtendedExecution.Foreground` namespace.
21
+
22
+ This package provides the `winrt.windows.applicationmodel.extendedexecution.foreground` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.ApplicationModel.ExtendedExecution.Foreground.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_applicationmodel_extendedexecution_foreground.pyi
9
+ winrt/windows/applicationmodel/extendedexecution/foreground/__init__.py
10
+ winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/PKG-INFO
11
+ winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/SOURCES.txt
12
+ winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/dependency_links.txt
13
+ winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/requires.txt
14
+ winrt_Windows.ApplicationModel.ExtendedExecution.Foreground.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.0.0-beta.1
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.0.0-beta.1