winrt-Windows.UI.Xaml.Interop 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/PKG-INFO +4 -4
  2. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/all-requirements.txt +2 -2
  3. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/py.Windows.UI.Xaml.Interop.cpp +348 -49
  4. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_ui_xaml_interop-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt/_winrt_windows_ui_xaml_interop.pyi +1 -3
  8. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt/windows/ui/xaml/interop/__init__.py +1 -1
  9. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt_Windows.UI.Xaml.Interop.egg-info/PKG-INFO +4 -4
  10. winrt_windows_ui_xaml_interop-2.2.0/winrt_Windows.UI.Xaml.Interop.egg-info/requires.txt +4 -0
  11. winrt_windows_ui_xaml_interop-2.1.0/pywinrt-version.txt +0 -1
  12. winrt_windows_ui_xaml_interop-2.1.0/winrt_Windows.UI.Xaml.Interop.egg-info/requires.txt +0 -4
  13. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/README.md +0 -0
  14. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/setup.cfg +0 -0
  15. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/setup.py +0 -0
  16. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt/windows/ui/xaml/interop/py.typed +0 -0
  17. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt_Windows.UI.Xaml.Interop.egg-info/SOURCES.txt +0 -0
  18. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt_Windows.UI.Xaml.Interop.egg-info/dependency_links.txt +0 -0
  19. {winrt_windows_ui_xaml_interop-2.1.0 → winrt_windows_ui_xaml_interop-2.2.0}/winrt_Windows.UI.Xaml.Interop.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Xaml.Interop
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.1.0
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-Windows.Foundation[all]==2.1.0
3
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,4 +1,4 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.UI.Xaml.Interop.h"
4
4
 
@@ -25,7 +25,7 @@ namespace py::cpp::Windows::UI::Xaml::Interop
25
25
  auto param3 = py::convert_to<int32_t>(args, 3);
26
26
  auto param4 = py::convert_to<int32_t>(args, 4);
27
27
 
28
- winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedEventArgs instance{ param0, param1, param2, param3, param4 };
28
+ winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedEventArgs instance{param0, param1, param2, param3, param4};
29
29
  return py::wrap(instance, type);
30
30
  }
31
31
  catch (...)
@@ -53,7 +53,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
53
53
  {
54
54
  try
55
55
  {
56
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"Action"))
56
+ static std::optional<bool> is_property_present{};
57
+
58
+ if (!is_property_present.has_value())
59
+ {
60
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"Action");
61
+ }
62
+
63
+ if (!is_property_present.value())
57
64
  {
58
65
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
59
66
  return nullptr;
@@ -72,7 +79,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
72
79
  {
73
80
  try
74
81
  {
75
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"NewItems"))
82
+ static std::optional<bool> is_property_present{};
83
+
84
+ if (!is_property_present.has_value())
85
+ {
86
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"NewItems");
87
+ }
88
+
89
+ if (!is_property_present.value())
76
90
  {
77
91
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
78
92
  return nullptr;
@@ -91,7 +105,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
91
105
  {
92
106
  try
93
107
  {
94
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"NewStartingIndex"))
108
+ static std::optional<bool> is_property_present{};
109
+
110
+ if (!is_property_present.has_value())
111
+ {
112
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"NewStartingIndex");
113
+ }
114
+
115
+ if (!is_property_present.value())
95
116
  {
96
117
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
97
118
  return nullptr;
@@ -110,7 +131,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
110
131
  {
111
132
  try
112
133
  {
113
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"OldItems"))
134
+ static std::optional<bool> is_property_present{};
135
+
136
+ if (!is_property_present.has_value())
137
+ {
138
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"OldItems");
139
+ }
140
+
141
+ if (!is_property_present.value())
114
142
  {
115
143
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
116
144
  return nullptr;
@@ -129,7 +157,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
129
157
  {
130
158
  try
131
159
  {
132
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"OldStartingIndex"))
160
+ static std::optional<bool> is_property_present{};
161
+
162
+ if (!is_property_present.has_value())
163
+ {
164
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.NotifyCollectionChangedEventArgs", L"OldStartingIndex");
165
+ }
166
+
167
+ if (!is_property_present.value())
133
168
  {
134
169
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
135
170
  return nullptr;
@@ -223,7 +258,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
223
258
  {
224
259
  try
225
260
  {
226
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0))
261
+ static std::optional<bool> is_overload_present{};
262
+
263
+ if (!is_overload_present.has_value())
264
+ {
265
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0);
266
+ }
267
+
268
+ if (!is_overload_present.value())
227
269
  {
228
270
  py::set_arg_count_version_error(0);
229
271
  return nullptr;
@@ -319,7 +361,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
319
361
  {
320
362
  try
321
363
  {
322
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterator", L"MoveNext", 0))
364
+ static std::optional<bool> is_overload_present{};
365
+
366
+ if (!is_overload_present.has_value())
367
+ {
368
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterator", L"MoveNext", 0);
369
+ }
370
+
371
+ if (!is_overload_present.value())
323
372
  {
324
373
  py::set_arg_count_version_error(0);
325
374
  return nullptr;
@@ -344,7 +393,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
344
393
  {
345
394
  try
346
395
  {
347
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableIterator", L"Current"))
396
+ static std::optional<bool> is_property_present{};
397
+
398
+ if (!is_property_present.has_value())
399
+ {
400
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableIterator", L"Current");
401
+ }
402
+
403
+ if (!is_property_present.value())
348
404
  {
349
405
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
350
406
  return nullptr;
@@ -363,7 +419,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
363
419
  {
364
420
  try
365
421
  {
366
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableIterator", L"HasCurrent"))
422
+ static std::optional<bool> is_property_present{};
423
+
424
+ if (!is_property_present.has_value())
425
+ {
426
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableIterator", L"HasCurrent");
427
+ }
428
+
429
+ if (!is_property_present.value())
367
430
  {
368
431
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
369
432
  return nullptr;
@@ -455,7 +518,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
455
518
  {
456
519
  try
457
520
  {
458
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Append", 1))
521
+ static std::optional<bool> is_overload_present{};
522
+
523
+ if (!is_overload_present.has_value())
524
+ {
525
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Append", 1);
526
+ }
527
+
528
+ if (!is_overload_present.value())
459
529
  {
460
530
  py::set_arg_count_version_error(1);
461
531
  return nullptr;
@@ -487,7 +557,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
487
557
  {
488
558
  try
489
559
  {
490
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Clear", 0))
560
+ static std::optional<bool> is_overload_present{};
561
+
562
+ if (!is_overload_present.has_value())
563
+ {
564
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Clear", 0);
565
+ }
566
+
567
+ if (!is_overload_present.value())
491
568
  {
492
569
  py::set_arg_count_version_error(0);
493
570
  return nullptr;
@@ -517,7 +594,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
517
594
  {
518
595
  try
519
596
  {
520
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0))
597
+ static std::optional<bool> is_overload_present{};
598
+
599
+ if (!is_overload_present.has_value())
600
+ {
601
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0);
602
+ }
603
+
604
+ if (!is_overload_present.value())
521
605
  {
522
606
  py::set_arg_count_version_error(0);
523
607
  return nullptr;
@@ -546,7 +630,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
546
630
  {
547
631
  try
548
632
  {
549
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetAt", 1))
633
+ static std::optional<bool> is_overload_present{};
634
+
635
+ if (!is_overload_present.has_value())
636
+ {
637
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetAt", 1);
638
+ }
639
+
640
+ if (!is_overload_present.value())
550
641
  {
551
642
  py::set_arg_count_version_error(1);
552
643
  return nullptr;
@@ -577,7 +668,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
577
668
  {
578
669
  try
579
670
  {
580
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetView", 0))
671
+ static std::optional<bool> is_overload_present{};
672
+
673
+ if (!is_overload_present.has_value())
674
+ {
675
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetView", 0);
676
+ }
677
+
678
+ if (!is_overload_present.value())
581
679
  {
582
680
  py::set_arg_count_version_error(0);
583
681
  return nullptr;
@@ -606,7 +704,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
606
704
  {
607
705
  try
608
706
  {
609
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"IndexOf", 1))
707
+ static std::optional<bool> is_overload_present{};
708
+
709
+ if (!is_overload_present.has_value())
710
+ {
711
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"IndexOf", 1);
712
+ }
713
+
714
+ if (!is_overload_present.value())
610
715
  {
611
716
  py::set_arg_count_version_error(1);
612
717
  return nullptr;
@@ -650,7 +755,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
650
755
  {
651
756
  try
652
757
  {
653
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"InsertAt", 2))
758
+ static std::optional<bool> is_overload_present{};
759
+
760
+ if (!is_overload_present.has_value())
761
+ {
762
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"InsertAt", 2);
763
+ }
764
+
765
+ if (!is_overload_present.value())
654
766
  {
655
767
  py::set_arg_count_version_error(2);
656
768
  return nullptr;
@@ -683,7 +795,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
683
795
  {
684
796
  try
685
797
  {
686
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAt", 1))
798
+ static std::optional<bool> is_overload_present{};
799
+
800
+ if (!is_overload_present.has_value())
801
+ {
802
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAt", 1);
803
+ }
804
+
805
+ if (!is_overload_present.value())
687
806
  {
688
807
  py::set_arg_count_version_error(1);
689
808
  return nullptr;
@@ -715,7 +834,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
715
834
  {
716
835
  try
717
836
  {
718
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAtEnd", 0))
837
+ static std::optional<bool> is_overload_present{};
838
+
839
+ if (!is_overload_present.has_value())
840
+ {
841
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAtEnd", 0);
842
+ }
843
+
844
+ if (!is_overload_present.value())
719
845
  {
720
846
  py::set_arg_count_version_error(0);
721
847
  return nullptr;
@@ -745,7 +871,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
745
871
  {
746
872
  try
747
873
  {
748
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"SetAt", 2))
874
+ static std::optional<bool> is_overload_present{};
875
+
876
+ if (!is_overload_present.has_value())
877
+ {
878
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"SetAt", 2);
879
+ }
880
+
881
+ if (!is_overload_present.value())
749
882
  {
750
883
  py::set_arg_count_version_error(2);
751
884
  return nullptr;
@@ -774,7 +907,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
774
907
  {
775
908
  try
776
909
  {
777
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Size"))
910
+ static std::optional<bool> is_property_present{};
911
+
912
+ if (!is_property_present.has_value())
913
+ {
914
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Size");
915
+ }
916
+
917
+ if (!is_property_present.value())
778
918
  {
779
919
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
780
920
  return nullptr;
@@ -793,7 +933,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
793
933
  {
794
934
  try
795
935
  {
796
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.IBindableObservableVector", L"VectorChanged"))
936
+ static std::optional<bool> is_event_present{};
937
+
938
+ if (!is_event_present.has_value())
939
+ {
940
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.IBindableObservableVector", L"VectorChanged");
941
+ }
942
+
943
+ if (!is_event_present.value())
797
944
  {
798
945
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
799
946
  return nullptr;
@@ -814,7 +961,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
814
961
  {
815
962
  try
816
963
  {
817
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.IBindableObservableVector", L"VectorChanged"))
964
+ static std::optional<bool> is_event_present{};
965
+
966
+ if (!is_event_present.has_value())
967
+ {
968
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.IBindableObservableVector", L"VectorChanged");
969
+ }
970
+
971
+ if (!is_event_present.value())
818
972
  {
819
973
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
820
974
  return nullptr;
@@ -919,7 +1073,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
919
1073
  {
920
1074
  try
921
1075
  {
922
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Append", 1))
1076
+ static std::optional<bool> is_overload_present{};
1077
+
1078
+ if (!is_overload_present.has_value())
1079
+ {
1080
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Append", 1);
1081
+ }
1082
+
1083
+ if (!is_overload_present.value())
923
1084
  {
924
1085
  py::set_arg_count_version_error(1);
925
1086
  return nullptr;
@@ -951,7 +1112,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
951
1112
  {
952
1113
  try
953
1114
  {
954
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Clear", 0))
1115
+ static std::optional<bool> is_overload_present{};
1116
+
1117
+ if (!is_overload_present.has_value())
1118
+ {
1119
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Clear", 0);
1120
+ }
1121
+
1122
+ if (!is_overload_present.value())
955
1123
  {
956
1124
  py::set_arg_count_version_error(0);
957
1125
  return nullptr;
@@ -981,7 +1149,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
981
1149
  {
982
1150
  try
983
1151
  {
984
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0))
1152
+ static std::optional<bool> is_overload_present{};
1153
+
1154
+ if (!is_overload_present.has_value())
1155
+ {
1156
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0);
1157
+ }
1158
+
1159
+ if (!is_overload_present.value())
985
1160
  {
986
1161
  py::set_arg_count_version_error(0);
987
1162
  return nullptr;
@@ -1010,7 +1185,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1010
1185
  {
1011
1186
  try
1012
1187
  {
1013
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetAt", 1))
1188
+ static std::optional<bool> is_overload_present{};
1189
+
1190
+ if (!is_overload_present.has_value())
1191
+ {
1192
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetAt", 1);
1193
+ }
1194
+
1195
+ if (!is_overload_present.value())
1014
1196
  {
1015
1197
  py::set_arg_count_version_error(1);
1016
1198
  return nullptr;
@@ -1041,7 +1223,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1041
1223
  {
1042
1224
  try
1043
1225
  {
1044
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetView", 0))
1226
+ static std::optional<bool> is_overload_present{};
1227
+
1228
+ if (!is_overload_present.has_value())
1229
+ {
1230
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"GetView", 0);
1231
+ }
1232
+
1233
+ if (!is_overload_present.value())
1045
1234
  {
1046
1235
  py::set_arg_count_version_error(0);
1047
1236
  return nullptr;
@@ -1070,7 +1259,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1070
1259
  {
1071
1260
  try
1072
1261
  {
1073
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"IndexOf", 1))
1262
+ static std::optional<bool> is_overload_present{};
1263
+
1264
+ if (!is_overload_present.has_value())
1265
+ {
1266
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"IndexOf", 1);
1267
+ }
1268
+
1269
+ if (!is_overload_present.value())
1074
1270
  {
1075
1271
  py::set_arg_count_version_error(1);
1076
1272
  return nullptr;
@@ -1114,7 +1310,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1114
1310
  {
1115
1311
  try
1116
1312
  {
1117
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"InsertAt", 2))
1313
+ static std::optional<bool> is_overload_present{};
1314
+
1315
+ if (!is_overload_present.has_value())
1316
+ {
1317
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"InsertAt", 2);
1318
+ }
1319
+
1320
+ if (!is_overload_present.value())
1118
1321
  {
1119
1322
  py::set_arg_count_version_error(2);
1120
1323
  return nullptr;
@@ -1147,7 +1350,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1147
1350
  {
1148
1351
  try
1149
1352
  {
1150
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAt", 1))
1353
+ static std::optional<bool> is_overload_present{};
1354
+
1355
+ if (!is_overload_present.has_value())
1356
+ {
1357
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAt", 1);
1358
+ }
1359
+
1360
+ if (!is_overload_present.value())
1151
1361
  {
1152
1362
  py::set_arg_count_version_error(1);
1153
1363
  return nullptr;
@@ -1179,7 +1389,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1179
1389
  {
1180
1390
  try
1181
1391
  {
1182
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAtEnd", 0))
1392
+ static std::optional<bool> is_overload_present{};
1393
+
1394
+ if (!is_overload_present.has_value())
1395
+ {
1396
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"RemoveAtEnd", 0);
1397
+ }
1398
+
1399
+ if (!is_overload_present.value())
1183
1400
  {
1184
1401
  py::set_arg_count_version_error(0);
1185
1402
  return nullptr;
@@ -1209,7 +1426,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1209
1426
  {
1210
1427
  try
1211
1428
  {
1212
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"SetAt", 2))
1429
+ static std::optional<bool> is_overload_present{};
1430
+
1431
+ if (!is_overload_present.has_value())
1432
+ {
1433
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"SetAt", 2);
1434
+ }
1435
+
1436
+ if (!is_overload_present.value())
1213
1437
  {
1214
1438
  py::set_arg_count_version_error(2);
1215
1439
  return nullptr;
@@ -1238,7 +1462,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1238
1462
  {
1239
1463
  try
1240
1464
  {
1241
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Size"))
1465
+ static std::optional<bool> is_property_present{};
1466
+
1467
+ if (!is_property_present.has_value())
1468
+ {
1469
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableVector", L"Size");
1470
+ }
1471
+
1472
+ if (!is_property_present.value())
1242
1473
  {
1243
1474
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1244
1475
  return nullptr;
@@ -1338,7 +1569,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1338
1569
  {
1339
1570
  try
1340
1571
  {
1341
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0))
1572
+ static std::optional<bool> is_overload_present{};
1573
+
1574
+ if (!is_overload_present.has_value())
1575
+ {
1576
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableIterable", L"First", 0);
1577
+ }
1578
+
1579
+ if (!is_overload_present.value())
1342
1580
  {
1343
1581
  py::set_arg_count_version_error(0);
1344
1582
  return nullptr;
@@ -1367,7 +1605,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1367
1605
  {
1368
1606
  try
1369
1607
  {
1370
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVectorView", L"GetAt", 1))
1608
+ static std::optional<bool> is_overload_present{};
1609
+
1610
+ if (!is_overload_present.has_value())
1611
+ {
1612
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVectorView", L"GetAt", 1);
1613
+ }
1614
+
1615
+ if (!is_overload_present.value())
1371
1616
  {
1372
1617
  py::set_arg_count_version_error(1);
1373
1618
  return nullptr;
@@ -1398,7 +1643,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1398
1643
  {
1399
1644
  try
1400
1645
  {
1401
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVectorView", L"IndexOf", 1))
1646
+ static std::optional<bool> is_overload_present{};
1647
+
1648
+ if (!is_overload_present.has_value())
1649
+ {
1650
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Interop.IBindableVectorView", L"IndexOf", 1);
1651
+ }
1652
+
1653
+ if (!is_overload_present.value())
1402
1654
  {
1403
1655
  py::set_arg_count_version_error(1);
1404
1656
  return nullptr;
@@ -1438,7 +1690,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1438
1690
  {
1439
1691
  try
1440
1692
  {
1441
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableVectorView", L"Size"))
1693
+ static std::optional<bool> is_property_present{};
1694
+
1695
+ if (!is_property_present.has_value())
1696
+ {
1697
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Interop.IBindableVectorView", L"Size");
1698
+ }
1699
+
1700
+ if (!is_property_present.value())
1442
1701
  {
1443
1702
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1444
1703
  return nullptr;
@@ -1527,7 +1786,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1527
1786
  {
1528
1787
  try
1529
1788
  {
1530
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.INotifyCollectionChanged", L"CollectionChanged"))
1789
+ static std::optional<bool> is_event_present{};
1790
+
1791
+ if (!is_event_present.has_value())
1792
+ {
1793
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.INotifyCollectionChanged", L"CollectionChanged");
1794
+ }
1795
+
1796
+ if (!is_event_present.value())
1531
1797
  {
1532
1798
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
1533
1799
  return nullptr;
@@ -1548,7 +1814,14 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1548
1814
  {
1549
1815
  try
1550
1816
  {
1551
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.INotifyCollectionChanged", L"CollectionChanged"))
1817
+ static std::optional<bool> is_event_present{};
1818
+
1819
+ if (!is_event_present.has_value())
1820
+ {
1821
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Interop.INotifyCollectionChanged", L"CollectionChanged");
1822
+ }
1823
+
1824
+ if (!is_event_present.value())
1552
1825
  {
1553
1826
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
1554
1827
  return nullptr;
@@ -1796,6 +2069,23 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1796
2069
  }
1797
2070
  }
1798
2071
 
2072
+ static PyObject* _repr_TypeName(PyObject* self) noexcept
2073
+ {
2074
+ py::pyobj_handle Name{PyObject_GetAttrString(self, "name")};
2075
+ if (!Name)
2076
+ {
2077
+ return nullptr;
2078
+ }
2079
+
2080
+ py::pyobj_handle Kind{PyObject_GetAttrString(self, "kind")};
2081
+ if (!Kind)
2082
+ {
2083
+ return nullptr;
2084
+ }
2085
+
2086
+ return PyUnicode_FromFormat("TypeName(name=%R, kind=%R)", Name.get(), Kind.get());
2087
+ }
2088
+
1799
2089
  static PyType_Slot _type_slots_TypeName[] = {
1800
2090
  { Py_tp_new, reinterpret_cast<void*>(_new_TypeName) },
1801
2091
  { Py_tp_init, reinterpret_cast<void*>(_init_TypeName) },
@@ -1803,6 +2093,7 @@ namespace py::cpp::Windows::UI::Xaml::Interop
1803
2093
  { Py_tp_methods, reinterpret_cast<void*>(_methods_TypeName) },
1804
2094
  { Py_tp_getset, reinterpret_cast<void*>(_getset_TypeName) },
1805
2095
  { Py_tp_richcompare, reinterpret_cast<void*>(_richcompare_TypeName) },
2096
+ { Py_tp_repr, reinterpret_cast<void*>(_repr_TypeName) },
1806
2097
  { }
1807
2098
  };
1808
2099
 
@@ -1858,42 +2149,50 @@ PyMODINIT_FUNC PyInit__winrt_windows_ui_xaml_interop(void) noexcept
1858
2149
  return nullptr;
1859
2150
  }
1860
2151
 
1861
- if (py::register_python_type(module.get(), &type_spec_NotifyCollectionChangedEventArgs, object_bases.get(), nullptr) == -1)
2152
+ py::pytype_handle NotifyCollectionChangedEventArgs_type{py::register_python_type(module.get(), &type_spec_NotifyCollectionChangedEventArgs, object_bases.get(), nullptr)};
2153
+ if (!NotifyCollectionChangedEventArgs_type)
1862
2154
  {
1863
2155
  return nullptr;
1864
2156
  }
1865
2157
 
1866
- if (py::register_python_type(module.get(), &type_spec_IBindableIterable, object_bases.get(), nullptr) == -1)
2158
+ py::pytype_handle IBindableIterable_type{py::register_python_type(module.get(), &type_spec_IBindableIterable, object_bases.get(), nullptr)};
2159
+ if (!IBindableIterable_type)
1867
2160
  {
1868
2161
  return nullptr;
1869
2162
  }
1870
2163
 
1871
- if (py::register_python_type(module.get(), &type_spec_IBindableIterator, object_bases.get(), nullptr) == -1)
2164
+ py::pytype_handle IBindableIterator_type{py::register_python_type(module.get(), &type_spec_IBindableIterator, object_bases.get(), nullptr)};
2165
+ if (!IBindableIterator_type)
1872
2166
  {
1873
2167
  return nullptr;
1874
2168
  }
1875
2169
 
1876
- if (py::register_python_type(module.get(), &type_spec_IBindableObservableVector, object_bases.get(), nullptr) == -1)
2170
+ py::pytype_handle IBindableObservableVector_type{py::register_python_type(module.get(), &type_spec_IBindableObservableVector, object_bases.get(), nullptr)};
2171
+ if (!IBindableObservableVector_type)
1877
2172
  {
1878
2173
  return nullptr;
1879
2174
  }
1880
2175
 
1881
- if (py::register_python_type(module.get(), &type_spec_IBindableVector, object_bases.get(), nullptr) == -1)
2176
+ py::pytype_handle IBindableVector_type{py::register_python_type(module.get(), &type_spec_IBindableVector, object_bases.get(), nullptr)};
2177
+ if (!IBindableVector_type)
1882
2178
  {
1883
2179
  return nullptr;
1884
2180
  }
1885
2181
 
1886
- if (py::register_python_type(module.get(), &type_spec_IBindableVectorView, object_bases.get(), nullptr) == -1)
2182
+ py::pytype_handle IBindableVectorView_type{py::register_python_type(module.get(), &type_spec_IBindableVectorView, object_bases.get(), nullptr)};
2183
+ if (!IBindableVectorView_type)
1887
2184
  {
1888
2185
  return nullptr;
1889
2186
  }
1890
2187
 
1891
- if (py::register_python_type(module.get(), &type_spec_INotifyCollectionChanged, object_bases.get(), nullptr) == -1)
2188
+ py::pytype_handle INotifyCollectionChanged_type{py::register_python_type(module.get(), &type_spec_INotifyCollectionChanged, object_bases.get(), nullptr)};
2189
+ if (!INotifyCollectionChanged_type)
1892
2190
  {
1893
2191
  return nullptr;
1894
2192
  }
1895
2193
 
1896
- if (py::register_python_type(module.get(), &type_spec_TypeName, nullptr, nullptr) == -1)
2194
+ py::pytype_handle TypeName_type{py::register_python_type(module.get(), &type_spec_TypeName, nullptr, nullptr)};
2195
+ if (!TypeName_type)
1897
2196
  {
1898
2197
  return nullptr;
1899
2198
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies", "optional-dependencies"]
19
- requires-python = ">=3.9,<3.13"
19
+ requires-python = ">=3.9,<3.14"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
36
36
  # use local winrt-sdk build dependency
37
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
+ before-build = "uv pip install setuptools"
40
41
  # don't build for PyPy
41
42
  skip = "pp*"
42
43
  # suppress warnings about ARM64 testing
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.1.0
3
+ winrt-runtime==2.2.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -21,8 +21,6 @@ class TypeName:
21
21
  name: str
22
22
  kind: TypeKind
23
23
  def __init__(self, name: str, kind: TypeKind) -> None: ...
24
- def __eq__(self, other: object, /) -> bool: ...
25
- def __ne__(self, other: object, /) -> bool: ...
26
24
 
27
25
  @typing.final
28
26
  class NotifyCollectionChangedEventArgs(winrt.system.Object):
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import enum
4
4
  import typing
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Xaml.Interop
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,11 +10,11 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.1.0
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,4 +0,0 @@
1
- winrt-runtime==2.1.0
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.1.0