winrt-Windows.UI.Composition.Desktop 2.0.0b2__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/PKG-INFO +6 -1
  2. winrt_windows_ui_composition_desktop-2.1.0/all-requirements.txt +5 -0
  3. winrt_windows_ui_composition_desktop-2.1.0/py.Windows.UI.Composition.Desktop.cpp +622 -0
  4. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/pyproject.toml +4 -3
  5. winrt_windows_ui_composition_desktop-2.1.0/pywinrt-version.txt +1 -0
  6. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/requirements.txt +2 -2
  7. winrt_windows_ui_composition_desktop-2.1.0/setup.py +31 -0
  8. winrt_windows_ui_composition_desktop-2.1.0/winrt/_winrt_windows_ui_composition_desktop.pyi +54 -0
  9. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/winrt/windows/ui/composition/desktop/__init__.py +1 -1
  10. winrt_windows_ui_composition_desktop-2.1.0/winrt/windows/ui/composition/desktop/py.typed +0 -0
  11. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/winrt_Windows.UI.Composition.Desktop.egg-info/PKG-INFO +6 -1
  12. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/winrt_Windows.UI.Composition.Desktop.egg-info/SOURCES.txt +2 -0
  13. winrt_windows_ui_composition_desktop-2.1.0/winrt_Windows.UI.Composition.Desktop.egg-info/requires.txt +6 -0
  14. winrt-Windows.UI.Composition.Desktop-2.0.0b2/py.Windows.UI.Composition.Desktop.cpp +0 -150
  15. winrt-Windows.UI.Composition.Desktop-2.0.0b2/pywinrt-version.txt +0 -1
  16. winrt-Windows.UI.Composition.Desktop-2.0.0b2/setup.py +0 -16
  17. winrt-Windows.UI.Composition.Desktop-2.0.0b2/winrt/_winrt_windows_ui_composition_desktop.pyi +0 -21
  18. winrt-Windows.UI.Composition.Desktop-2.0.0b2/winrt_Windows.UI.Composition.Desktop.egg-info/requires.txt +0 -1
  19. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/README.md +0 -0
  20. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/setup.cfg +0 -0
  21. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/winrt_Windows.UI.Composition.Desktop.egg-info/dependency_links.txt +0 -0
  22. {winrt-Windows.UI.Composition.Desktop-2.0.0b2 → winrt_windows_ui_composition_desktop-2.1.0}/winrt_Windows.UI.Composition.Desktop.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Composition.Desktop
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,6 +12,11 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
16
+ Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.System[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.UI.Composition[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.UI.Core[all]==2.1.0; extra == "all"
15
20
 
16
21
  <!-- warning: Please don't edit this file. It was automatically generated. -->
17
22
 
@@ -0,0 +1,5 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
+
3
+ winrt-Windows.System[all]==2.1.0
4
+ winrt-Windows.UI.Composition[all]==2.1.0
5
+ winrt-Windows.UI.Core[all]==2.1.0
@@ -0,0 +1,622 @@
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
+
3
+ #include "py.Windows.UI.Composition.Desktop.h"
4
+
5
+ namespace py::cpp::Windows::UI::Composition::Desktop
6
+ {
7
+ // ----- DesktopWindowTarget class --------------------
8
+
9
+ static PyObject* _new_DesktopWindowTarget(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
10
+ {
11
+ static_assert(py::py_type<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>::type_name);
12
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>::type_name);
13
+ return nullptr;
14
+ }
15
+
16
+ static void _dealloc_DesktopWindowTarget(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self) noexcept
17
+ {
18
+ auto tp = Py_TYPE(self);
19
+ std::destroy_at(&self->obj);
20
+ tp->tp_free(self);
21
+ Py_DECREF(tp);
22
+ }
23
+
24
+ static PyObject* DesktopWindowTarget_Close(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
25
+ {
26
+ auto arg_count = PyTuple_Size(args);
27
+
28
+ if (arg_count == 0)
29
+ {
30
+ try
31
+ {
32
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"Close", 0))
33
+ {
34
+ py::set_arg_count_version_error(0);
35
+ return nullptr;
36
+ }
37
+
38
+ self->obj.Close();
39
+ Py_RETURN_NONE;
40
+ }
41
+ catch (...)
42
+ {
43
+ py::to_PyErr();
44
+ return nullptr;
45
+ }
46
+ }
47
+ else
48
+ {
49
+ py::set_invalid_arg_count_error(arg_count);
50
+ return nullptr;
51
+ }
52
+ }
53
+
54
+ static PyObject* DesktopWindowTarget_PopulatePropertyInfo(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
55
+ {
56
+ auto arg_count = PyTuple_Size(args);
57
+
58
+ if (arg_count == 2)
59
+ {
60
+ try
61
+ {
62
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"PopulatePropertyInfo", 2))
63
+ {
64
+ py::set_arg_count_version_error(2);
65
+ return nullptr;
66
+ }
67
+
68
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
69
+ auto param1 = py::convert_to<winrt::Windows::UI::Composition::AnimationPropertyInfo>(args, 1);
70
+
71
+ self->obj.PopulatePropertyInfo(param0, param1);
72
+ Py_RETURN_NONE;
73
+ }
74
+ catch (...)
75
+ {
76
+ py::to_PyErr();
77
+ return nullptr;
78
+ }
79
+ }
80
+ else
81
+ {
82
+ py::set_invalid_arg_count_error(arg_count);
83
+ return nullptr;
84
+ }
85
+ }
86
+
87
+ static PyObject* DesktopWindowTarget_StartAnimation(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
88
+ {
89
+ auto arg_count = PyTuple_Size(args);
90
+
91
+ if (arg_count == 2)
92
+ {
93
+ try
94
+ {
95
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"StartAnimation", 2))
96
+ {
97
+ py::set_arg_count_version_error(2);
98
+ return nullptr;
99
+ }
100
+
101
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
102
+ auto param1 = py::convert_to<winrt::Windows::UI::Composition::CompositionAnimation>(args, 1);
103
+
104
+ self->obj.StartAnimation(param0, param1);
105
+ Py_RETURN_NONE;
106
+ }
107
+ catch (...)
108
+ {
109
+ py::to_PyErr();
110
+ return nullptr;
111
+ }
112
+ }
113
+ else if (arg_count == 3)
114
+ {
115
+ try
116
+ {
117
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"StartAnimation", 3))
118
+ {
119
+ py::set_arg_count_version_error(3);
120
+ return nullptr;
121
+ }
122
+
123
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
124
+ auto param1 = py::convert_to<winrt::Windows::UI::Composition::CompositionAnimation>(args, 1);
125
+ auto param2 = py::convert_to<winrt::Windows::UI::Composition::AnimationController>(args, 2);
126
+
127
+ self->obj.StartAnimation(param0, param1, param2);
128
+ Py_RETURN_NONE;
129
+ }
130
+ catch (...)
131
+ {
132
+ py::to_PyErr();
133
+ return nullptr;
134
+ }
135
+ }
136
+ else
137
+ {
138
+ py::set_invalid_arg_count_error(arg_count);
139
+ return nullptr;
140
+ }
141
+ }
142
+
143
+ static PyObject* DesktopWindowTarget_StartAnimationGroup(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
144
+ {
145
+ auto arg_count = PyTuple_Size(args);
146
+
147
+ if (arg_count == 1)
148
+ {
149
+ try
150
+ {
151
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"StartAnimationGroup", 1))
152
+ {
153
+ py::set_arg_count_version_error(1);
154
+ return nullptr;
155
+ }
156
+
157
+ auto param0 = py::convert_to<winrt::Windows::UI::Composition::ICompositionAnimationBase>(args, 0);
158
+
159
+ self->obj.StartAnimationGroup(param0);
160
+ Py_RETURN_NONE;
161
+ }
162
+ catch (...)
163
+ {
164
+ py::to_PyErr();
165
+ return nullptr;
166
+ }
167
+ }
168
+ else
169
+ {
170
+ py::set_invalid_arg_count_error(arg_count);
171
+ return nullptr;
172
+ }
173
+ }
174
+
175
+ static PyObject* DesktopWindowTarget_StopAnimation(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
176
+ {
177
+ auto arg_count = PyTuple_Size(args);
178
+
179
+ if (arg_count == 1)
180
+ {
181
+ try
182
+ {
183
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"StopAnimation", 1))
184
+ {
185
+ py::set_arg_count_version_error(1);
186
+ return nullptr;
187
+ }
188
+
189
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
190
+
191
+ self->obj.StopAnimation(param0);
192
+ Py_RETURN_NONE;
193
+ }
194
+ catch (...)
195
+ {
196
+ py::to_PyErr();
197
+ return nullptr;
198
+ }
199
+ }
200
+ else
201
+ {
202
+ py::set_invalid_arg_count_error(arg_count);
203
+ return nullptr;
204
+ }
205
+ }
206
+
207
+ static PyObject* DesktopWindowTarget_StopAnimationGroup(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
208
+ {
209
+ auto arg_count = PyTuple_Size(args);
210
+
211
+ if (arg_count == 1)
212
+ {
213
+ try
214
+ {
215
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"StopAnimationGroup", 1))
216
+ {
217
+ py::set_arg_count_version_error(1);
218
+ return nullptr;
219
+ }
220
+
221
+ auto param0 = py::convert_to<winrt::Windows::UI::Composition::ICompositionAnimationBase>(args, 0);
222
+
223
+ self->obj.StopAnimationGroup(param0);
224
+ Py_RETURN_NONE;
225
+ }
226
+ catch (...)
227
+ {
228
+ py::to_PyErr();
229
+ return nullptr;
230
+ }
231
+ }
232
+ else
233
+ {
234
+ py::set_invalid_arg_count_error(arg_count);
235
+ return nullptr;
236
+ }
237
+ }
238
+
239
+ static PyObject* DesktopWindowTarget_TryGetAnimationController(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* args) noexcept
240
+ {
241
+ auto arg_count = PyTuple_Size(args);
242
+
243
+ if (arg_count == 1)
244
+ {
245
+ try
246
+ {
247
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Composition.CompositionObject", L"TryGetAnimationController", 1))
248
+ {
249
+ py::set_arg_count_version_error(1);
250
+ return nullptr;
251
+ }
252
+
253
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
254
+
255
+ return py::convert(self->obj.TryGetAnimationController(param0));
256
+ }
257
+ catch (...)
258
+ {
259
+ py::to_PyErr();
260
+ return nullptr;
261
+ }
262
+ }
263
+ else
264
+ {
265
+ py::set_invalid_arg_count_error(arg_count);
266
+ return nullptr;
267
+ }
268
+ }
269
+
270
+ static PyObject* DesktopWindowTarget_get_IsTopmost(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
271
+ {
272
+ try
273
+ {
274
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.Desktop.DesktopWindowTarget", L"IsTopmost"))
275
+ {
276
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
277
+ return nullptr;
278
+ }
279
+
280
+ return py::convert(self->obj.IsTopmost());
281
+ }
282
+ catch (...)
283
+ {
284
+ py::to_PyErr();
285
+ return nullptr;
286
+ }
287
+ }
288
+
289
+ static PyObject* DesktopWindowTarget_get_Root(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
290
+ {
291
+ try
292
+ {
293
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionTarget", L"Root"))
294
+ {
295
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
296
+ return nullptr;
297
+ }
298
+
299
+ return py::convert(self->obj.Root());
300
+ }
301
+ catch (...)
302
+ {
303
+ py::to_PyErr();
304
+ return nullptr;
305
+ }
306
+ }
307
+
308
+ static int DesktopWindowTarget_put_Root(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* arg, void* /*unused*/) noexcept
309
+ {
310
+ if (arg == nullptr)
311
+ {
312
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
313
+ return -1;
314
+ }
315
+
316
+ try
317
+ {
318
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionTarget", L"Root"))
319
+ {
320
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
321
+ return -1;
322
+ }
323
+
324
+ auto param0 = py::convert_to<winrt::Windows::UI::Composition::Visual>(arg);
325
+
326
+ self->obj.Root(param0);
327
+ return 0;
328
+ }
329
+ catch (...)
330
+ {
331
+ py::to_PyErr();
332
+ return -1;
333
+ }
334
+ }
335
+
336
+ static PyObject* DesktopWindowTarget_get_Compositor(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
337
+ {
338
+ try
339
+ {
340
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"Compositor"))
341
+ {
342
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
343
+ return nullptr;
344
+ }
345
+
346
+ return py::convert(self->obj.Compositor());
347
+ }
348
+ catch (...)
349
+ {
350
+ py::to_PyErr();
351
+ return nullptr;
352
+ }
353
+ }
354
+
355
+ static PyObject* DesktopWindowTarget_get_Dispatcher(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
356
+ {
357
+ try
358
+ {
359
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"Dispatcher"))
360
+ {
361
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
362
+ return nullptr;
363
+ }
364
+
365
+ return py::convert(self->obj.Dispatcher());
366
+ }
367
+ catch (...)
368
+ {
369
+ py::to_PyErr();
370
+ return nullptr;
371
+ }
372
+ }
373
+
374
+ static PyObject* DesktopWindowTarget_get_Properties(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
375
+ {
376
+ try
377
+ {
378
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"Properties"))
379
+ {
380
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
381
+ return nullptr;
382
+ }
383
+
384
+ return py::convert(self->obj.Properties());
385
+ }
386
+ catch (...)
387
+ {
388
+ py::to_PyErr();
389
+ return nullptr;
390
+ }
391
+ }
392
+
393
+ static PyObject* DesktopWindowTarget_get_ImplicitAnimations(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
394
+ {
395
+ try
396
+ {
397
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"ImplicitAnimations"))
398
+ {
399
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
400
+ return nullptr;
401
+ }
402
+
403
+ return py::convert(self->obj.ImplicitAnimations());
404
+ }
405
+ catch (...)
406
+ {
407
+ py::to_PyErr();
408
+ return nullptr;
409
+ }
410
+ }
411
+
412
+ static int DesktopWindowTarget_put_ImplicitAnimations(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* arg, void* /*unused*/) noexcept
413
+ {
414
+ if (arg == nullptr)
415
+ {
416
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
417
+ return -1;
418
+ }
419
+
420
+ try
421
+ {
422
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"ImplicitAnimations"))
423
+ {
424
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
425
+ return -1;
426
+ }
427
+
428
+ auto param0 = py::convert_to<winrt::Windows::UI::Composition::ImplicitAnimationCollection>(arg);
429
+
430
+ self->obj.ImplicitAnimations(param0);
431
+ return 0;
432
+ }
433
+ catch (...)
434
+ {
435
+ py::to_PyErr();
436
+ return -1;
437
+ }
438
+ }
439
+
440
+ static PyObject* DesktopWindowTarget_get_Comment(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
441
+ {
442
+ try
443
+ {
444
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"Comment"))
445
+ {
446
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
447
+ return nullptr;
448
+ }
449
+
450
+ return py::convert(self->obj.Comment());
451
+ }
452
+ catch (...)
453
+ {
454
+ py::to_PyErr();
455
+ return nullptr;
456
+ }
457
+ }
458
+
459
+ static int DesktopWindowTarget_put_Comment(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, PyObject* arg, void* /*unused*/) noexcept
460
+ {
461
+ if (arg == nullptr)
462
+ {
463
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
464
+ return -1;
465
+ }
466
+
467
+ try
468
+ {
469
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"Comment"))
470
+ {
471
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
472
+ return -1;
473
+ }
474
+
475
+ auto param0 = py::convert_to<winrt::hstring>(arg);
476
+
477
+ self->obj.Comment(param0);
478
+ return 0;
479
+ }
480
+ catch (...)
481
+ {
482
+ py::to_PyErr();
483
+ return -1;
484
+ }
485
+ }
486
+
487
+ static PyObject* DesktopWindowTarget_get_DispatcherQueue(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
488
+ {
489
+ try
490
+ {
491
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.CompositionObject", L"DispatcherQueue"))
492
+ {
493
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
494
+ return nullptr;
495
+ }
496
+
497
+ return py::convert(self->obj.DispatcherQueue());
498
+ }
499
+ catch (...)
500
+ {
501
+ py::to_PyErr();
502
+ return nullptr;
503
+ }
504
+ }
505
+
506
+ static PyObject* _assign_array_DesktopWindowTarget(PyObject* /*unused*/, PyObject* arg) noexcept
507
+ {
508
+ auto array = std::make_unique<py::ComArray<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>>();
509
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
510
+ {
511
+ return nullptr;
512
+ }
513
+ Py_RETURN_NONE;
514
+ }
515
+
516
+ static PyObject* _from_DesktopWindowTarget(PyObject* /*unused*/, PyObject* arg) noexcept
517
+ {
518
+ try
519
+ {
520
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
521
+ return py::convert(return_value.as<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>());
522
+ }
523
+ catch (...)
524
+ {
525
+ py::to_PyErr();
526
+ return nullptr;
527
+ }
528
+ }
529
+
530
+ static PyMethodDef _methods_DesktopWindowTarget[] = {
531
+ { "close", reinterpret_cast<PyCFunction>(DesktopWindowTarget_Close), METH_VARARGS, nullptr },
532
+ { "populate_property_info", reinterpret_cast<PyCFunction>(DesktopWindowTarget_PopulatePropertyInfo), METH_VARARGS, nullptr },
533
+ { "start_animation", reinterpret_cast<PyCFunction>(DesktopWindowTarget_StartAnimation), METH_VARARGS, nullptr },
534
+ { "start_animation_group", reinterpret_cast<PyCFunction>(DesktopWindowTarget_StartAnimationGroup), METH_VARARGS, nullptr },
535
+ { "stop_animation", reinterpret_cast<PyCFunction>(DesktopWindowTarget_StopAnimation), METH_VARARGS, nullptr },
536
+ { "stop_animation_group", reinterpret_cast<PyCFunction>(DesktopWindowTarget_StopAnimationGroup), METH_VARARGS, nullptr },
537
+ { "try_get_animation_controller", reinterpret_cast<PyCFunction>(DesktopWindowTarget_TryGetAnimationController), METH_VARARGS, nullptr },
538
+ { "_assign_array_", _assign_array_DesktopWindowTarget, METH_O | METH_STATIC, nullptr },
539
+ { "_from", reinterpret_cast<PyCFunction>(_from_DesktopWindowTarget), METH_O | METH_STATIC, nullptr },
540
+ { }
541
+ };
542
+
543
+ static PyGetSetDef _getset_DesktopWindowTarget[] = {
544
+ { "is_topmost", reinterpret_cast<getter>(DesktopWindowTarget_get_IsTopmost), nullptr, nullptr, nullptr },
545
+ { "root", reinterpret_cast<getter>(DesktopWindowTarget_get_Root), reinterpret_cast<setter>(DesktopWindowTarget_put_Root), nullptr, nullptr },
546
+ { "compositor", reinterpret_cast<getter>(DesktopWindowTarget_get_Compositor), nullptr, nullptr, nullptr },
547
+ { "dispatcher", reinterpret_cast<getter>(DesktopWindowTarget_get_Dispatcher), nullptr, nullptr, nullptr },
548
+ { "properties", reinterpret_cast<getter>(DesktopWindowTarget_get_Properties), nullptr, nullptr, nullptr },
549
+ { "implicit_animations", reinterpret_cast<getter>(DesktopWindowTarget_get_ImplicitAnimations), reinterpret_cast<setter>(DesktopWindowTarget_put_ImplicitAnimations), nullptr, nullptr },
550
+ { "comment", reinterpret_cast<getter>(DesktopWindowTarget_get_Comment), reinterpret_cast<setter>(DesktopWindowTarget_put_Comment), nullptr, nullptr },
551
+ { "dispatcher_queue", reinterpret_cast<getter>(DesktopWindowTarget_get_DispatcherQueue), nullptr, nullptr, nullptr },
552
+ { }
553
+ };
554
+
555
+ static PyType_Slot _type_slots_DesktopWindowTarget[] = {
556
+ { Py_tp_new, reinterpret_cast<void*>(_new_DesktopWindowTarget) },
557
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DesktopWindowTarget) },
558
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_DesktopWindowTarget) },
559
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_DesktopWindowTarget) },
560
+ { }
561
+ };
562
+
563
+ static PyType_Spec type_spec_DesktopWindowTarget = {
564
+ "winrt._winrt_windows_ui_composition_desktop.DesktopWindowTarget",
565
+ sizeof(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget),
566
+ 0,
567
+ Py_TPFLAGS_DEFAULT,
568
+ _type_slots_DesktopWindowTarget};
569
+
570
+ // ----- Windows.UI.Composition.Desktop Initialization --------------------
571
+
572
+ PyDoc_STRVAR(module_doc, "Windows.UI.Composition.Desktop");
573
+
574
+ static PyModuleDef module_def = {
575
+ PyModuleDef_HEAD_INIT,
576
+ "_winrt_windows_ui_composition_desktop",
577
+ module_doc,
578
+ 0,
579
+ nullptr,
580
+ nullptr,
581
+ nullptr,
582
+ nullptr,
583
+ nullptr};
584
+ } // py::cpp::Windows::UI::Composition::Desktop
585
+
586
+ PyMODINIT_FUNC PyInit__winrt_windows_ui_composition_desktop(void) noexcept
587
+ {
588
+ using namespace py::cpp::Windows::UI::Composition::Desktop;
589
+
590
+ if (py::import_winrt_runtime() == -1)
591
+ {
592
+ return nullptr;
593
+ }
594
+
595
+ py::pyobj_handle module{PyModule_Create(&module_def)};
596
+
597
+ if (!module)
598
+ {
599
+ return nullptr;
600
+ }
601
+
602
+ auto object_type = py::get_object_type();
603
+ if (!object_type)
604
+ {
605
+ return nullptr;
606
+ }
607
+
608
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
609
+
610
+ if (!object_bases)
611
+ {
612
+ return nullptr;
613
+ }
614
+
615
+ if (py::register_python_type(module.get(), &type_spec_DesktopWindowTarget, object_bases.get(), nullptr) == -1)
616
+ {
617
+ return nullptr;
618
+ }
619
+
620
+
621
+ return module.detach();
622
+ }
@@ -1,7 +1,7 @@
1
1
  # WARNING: Please don't edit this file. It was automatically generated.
2
2
 
3
3
  [build-system]
4
- requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
4
+ requires = ["setuptools", "winrt-sdk"]
5
5
  build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
@@ -15,7 +15,7 @@ classifiers = [
15
15
  "Programming Language :: Python :: Implementation :: CPython",
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
- dynamic = ["version", "dependencies"]
18
+ dynamic = ["version", "dependencies", "optional-dependencies"]
19
19
  requires-python = ">=3.9,<3.13"
20
20
 
21
21
  [project.urls]
@@ -27,9 +27,10 @@ Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
27
27
  [tool.setuptools.dynamic]
28
28
  version = { file = "pywinrt-version.txt" }
29
29
  dependencies = { file = "requirements.txt" }
30
+ optional-dependencies.all = { file = "all-requirements.txt" }
30
31
 
31
32
  [tool.setuptools.package-data]
32
- winrt = ["*.pyi"]
33
+ "*" = ["*.pyi", "py.typed"]
33
34
 
34
35
  [tool.cibuildwheel]
35
36
  # use local winrt-sdk build dependency
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
- winrt-runtime==2.0.0-beta.2
3
+ winrt-runtime==2.1.0
@@ -0,0 +1,31 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from setuptools.command.build_ext import build_ext
5
+ from winrt_sdk import get_include_dirs
6
+
7
+
8
+ class build_ext_ex(build_ext):
9
+ def build_extension(self, ext):
10
+ if self.compiler.compiler_type == "msvc":
11
+ ext.extra_compile_args = ["/std:c++20", "/permissive-"]
12
+ elif self.compiler.compiler_type == "mingw32":
13
+ ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
14
+ ext.extra_link_args = ["-loleaut32"]
15
+ else:
16
+ raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
17
+
18
+ build_ext.build_extension(self, ext)
19
+
20
+
21
+ setup(
22
+ cmdclass = {'build_ext': build_ext_ex},
23
+ ext_modules=[
24
+ Extension(
25
+ "winrt._winrt_windows_ui_composition_desktop",
26
+ sources=["py.Windows.UI.Composition.Desktop.cpp"],
27
+ include_dirs=get_include_dirs(),
28
+ libraries=["windowsapp"],
29
+ )
30
+ ],
31
+ )
@@ -0,0 +1,54 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
+
3
+ import datetime
4
+ import sys
5
+ import types
6
+ import typing
7
+ import uuid as _uuid
8
+ from builtins import property as _property
9
+
10
+ import winrt._winrt
11
+ import winrt.system
12
+ import winrt.windows.system as windows_system
13
+ import winrt.windows.ui.composition as windows_ui_composition
14
+ import winrt.windows.ui.core as windows_ui_core
15
+
16
+ Self = typing.TypeVar('Self')
17
+
18
+ @typing.final
19
+ class DesktopWindowTarget(winrt.system.Object):
20
+ @staticmethod
21
+ def _from(obj: winrt.system.Object, /) -> DesktopWindowTarget: ...
22
+ def close(self) -> None: ...
23
+ def populate_property_info(self, property_name: str, property_info: typing.Optional[windows_ui_composition.AnimationPropertyInfo], /) -> None: ...
24
+ @typing.overload
25
+ def start_animation(self, property_name: str, animation: typing.Optional[windows_ui_composition.CompositionAnimation], /) -> None: ...
26
+ @typing.overload
27
+ def start_animation(self, property_name: str, animation: typing.Optional[windows_ui_composition.CompositionAnimation], animation_controller: typing.Optional[windows_ui_composition.AnimationController], /) -> None: ...
28
+ def start_animation_group(self, value: typing.Optional[windows_ui_composition.ICompositionAnimationBase], /) -> None: ...
29
+ def stop_animation(self, property_name: str, /) -> None: ...
30
+ def stop_animation_group(self, value: typing.Optional[windows_ui_composition.ICompositionAnimationBase], /) -> None: ...
31
+ def try_get_animation_controller(self, property_name: str, /) -> typing.Optional[windows_ui_composition.AnimationController]: ...
32
+ @_property
33
+ def is_topmost(self) -> bool: ...
34
+ @_property
35
+ def root(self) -> typing.Optional[windows_ui_composition.Visual]: ...
36
+ @root.setter
37
+ def root(self, value: typing.Optional[windows_ui_composition.Visual]) -> None: ...
38
+ @_property
39
+ def compositor(self) -> typing.Optional[windows_ui_composition.Compositor]: ...
40
+ @_property
41
+ def dispatcher(self) -> typing.Optional[windows_ui_core.CoreDispatcher]: ...
42
+ @_property
43
+ def properties(self) -> typing.Optional[windows_ui_composition.CompositionPropertySet]: ...
44
+ @_property
45
+ def implicit_animations(self) -> typing.Optional[windows_ui_composition.ImplicitAnimationCollection]: ...
46
+ @implicit_animations.setter
47
+ def implicit_animations(self, value: typing.Optional[windows_ui_composition.ImplicitAnimationCollection]) -> None: ...
48
+ @_property
49
+ def comment(self) -> str: ...
50
+ @comment.setter
51
+ def comment(self, value: str) -> None: ...
52
+ @_property
53
+ def dispatcher_queue(self) -> typing.Optional[windows_system.DispatcherQueue]: ...
54
+
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
2
 
3
3
  import winrt.system
4
4
  from winrt import _winrt_windows_ui_composition_desktop
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Composition.Desktop
3
- Version: 2.0.0b2
3
+ Version: 2.1.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -12,6 +12,11 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
13
  Requires-Python: <3.13,>=3.9
14
14
  Description-Content-Type: text/markdown
15
+ Requires-Dist: winrt-runtime==2.1.0
16
+ Provides-Extra: all
17
+ Requires-Dist: winrt-Windows.System[all]==2.1.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.UI.Composition[all]==2.1.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.UI.Core[all]==2.1.0; extra == "all"
15
20
 
16
21
  <!-- warning: Please don't edit this file. It was automatically generated. -->
17
22
 
@@ -1,4 +1,5 @@
1
1
  README.md
2
+ all-requirements.txt
2
3
  py.Windows.UI.Composition.Desktop.cpp
3
4
  pyproject.toml
4
5
  pywinrt-version.txt
@@ -6,6 +7,7 @@ requirements.txt
6
7
  setup.py
7
8
  winrt/_winrt_windows_ui_composition_desktop.pyi
8
9
  winrt/windows/ui/composition/desktop/__init__.py
10
+ winrt/windows/ui/composition/desktop/py.typed
9
11
  winrt_Windows.UI.Composition.Desktop.egg-info/PKG-INFO
10
12
  winrt_Windows.UI.Composition.Desktop.egg-info/SOURCES.txt
11
13
  winrt_Windows.UI.Composition.Desktop.egg-info/dependency_links.txt
@@ -0,0 +1,6 @@
1
+ winrt-runtime==2.1.0
2
+
3
+ [all]
4
+ winrt-Windows.System[all]==2.1.0
5
+ winrt-Windows.UI.Composition[all]==2.1.0
6
+ winrt-Windows.UI.Core[all]==2.1.0
@@ -1,150 +0,0 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
2
-
3
- #include "py.Windows.UI.Composition.Desktop.h"
4
-
5
-
6
- namespace py::cpp::Windows::UI::Composition::Desktop
7
- {
8
- // ----- DesktopWindowTarget class --------------------
9
-
10
- static PyObject* _new_DesktopWindowTarget(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
11
- {
12
- static_assert(py::py_type<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>::type_name);
13
- py::set_invalid_activation_error(py::py_type<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>::type_name);
14
- return nullptr;
15
- }
16
-
17
- static void _dealloc_DesktopWindowTarget(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* 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* DesktopWindowTarget_get_IsTopmost(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget* self, void* /*unused*/) noexcept
26
- {
27
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Composition.Desktop.DesktopWindowTarget", L"IsTopmost"))
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.IsTopmost());
36
- }
37
- catch (...)
38
- {
39
- py::to_PyErr();
40
- return nullptr;
41
- }
42
- }
43
-
44
- static PyObject* _assign_array_DesktopWindowTarget(PyObject* /*unused*/, PyObject* arg) noexcept
45
- {
46
- auto array = std::make_unique<py::ComArray<winrt::Windows::UI::Composition::Desktop::DesktopWindowTarget>>();
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_DesktopWindowTarget(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::UI::Composition::Desktop::DesktopWindowTarget>());
60
- }
61
- catch (...)
62
- {
63
- py::to_PyErr();
64
- return nullptr;
65
- }
66
- }
67
-
68
- static PyMethodDef _methods_DesktopWindowTarget[] = {
69
- { "_assign_array_", _assign_array_DesktopWindowTarget, METH_O | METH_STATIC, nullptr },
70
- { "_from", reinterpret_cast<PyCFunction>(_from_DesktopWindowTarget), METH_O | METH_STATIC, nullptr },
71
- { }
72
- };
73
-
74
- static PyGetSetDef _getset_DesktopWindowTarget[] = {
75
- { "is_topmost", reinterpret_cast<getter>(DesktopWindowTarget_get_IsTopmost), nullptr, nullptr, nullptr },
76
- { }
77
- };
78
-
79
- static PyType_Slot _type_slots_DesktopWindowTarget[] =
80
- {
81
- { Py_tp_new, reinterpret_cast<void*>(_new_DesktopWindowTarget) },
82
- { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DesktopWindowTarget) },
83
- { Py_tp_methods, reinterpret_cast<void*>(_methods_DesktopWindowTarget) },
84
- { Py_tp_getset, reinterpret_cast<void*>(_getset_DesktopWindowTarget) },
85
- { },
86
- };
87
-
88
- static PyType_Spec type_spec_DesktopWindowTarget =
89
- {
90
- "winrt._winrt_windows_ui_composition_desktop.DesktopWindowTarget",
91
- sizeof(py::wrapper::Windows::UI::Composition::Desktop::DesktopWindowTarget),
92
- 0,
93
- Py_TPFLAGS_DEFAULT,
94
- _type_slots_DesktopWindowTarget
95
- };
96
-
97
- // ----- Windows.UI.Composition.Desktop Initialization --------------------
98
- PyDoc_STRVAR(module_doc, "Windows::UI::Composition::Desktop");
99
-
100
-
101
- static PyModuleDef module_def
102
- = {PyModuleDef_HEAD_INIT,
103
- "_winrt_windows_ui_composition_desktop",
104
- module_doc,
105
- 0,
106
- nullptr,
107
- nullptr,
108
- nullptr,
109
- nullptr,
110
- nullptr};
111
-
112
- } // py::cpp::Windows::UI::Composition::Desktop
113
-
114
- PyMODINIT_FUNC PyInit__winrt_windows_ui_composition_desktop(void) noexcept
115
- {
116
- using namespace py::cpp::Windows::UI::Composition::Desktop;
117
-
118
- if (py::import_winrt_runtime() == -1)
119
- {
120
- return nullptr;
121
- }
122
-
123
- py::pyobj_handle module{PyModule_Create(&module_def)};
124
-
125
- if (!module)
126
- {
127
- return nullptr;
128
- }
129
-
130
- auto object_type = py::get_object_type();
131
- if (!object_type)
132
- {
133
- return nullptr;
134
- }
135
-
136
- py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
137
-
138
- if (!object_bases)
139
- {
140
- return nullptr;
141
- }
142
-
143
- if (py::register_python_type(module.get(), &type_spec_DesktopWindowTarget, object_bases.get(), nullptr) == -1)
144
- {
145
- return nullptr;
146
- }
147
-
148
-
149
- return module.detach();
150
- }
@@ -1 +0,0 @@
1
- 2.0.0-beta.2
@@ -1,16 +0,0 @@
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_ui_composition_desktop",
10
- sources=["py.Windows.UI.Composition.Desktop.cpp"],
11
- include_dirs=get_include_dirs(),
12
- extra_compile_args=["/std:c++20", "/permissive-"],
13
- libraries=["windowsapp"],
14
- )
15
- ],
16
- )
@@ -1,21 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.2
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
-
13
- Self = typing.TypeVar('Self')
14
-
15
- @typing.final
16
- class DesktopWindowTarget(winrt.system.Object):
17
- @staticmethod
18
- def _from(obj: winrt.system.Object, /) -> DesktopWindowTarget: ...
19
- @_property
20
- def is_topmost(self) -> bool: ...
21
-