winrt-Windows.UI.Xaml.Printing 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 (20) hide show
  1. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/PKG-INFO +7 -7
  2. winrt_windows_ui_xaml_printing-2.2.0/all-requirements.txt +6 -0
  3. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/py.Windows.UI.Xaml.Printing.cpp +213 -34
  4. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_ui_xaml_printing-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt/_winrt_windows_ui_xaml_printing.pyi +1 -1
  8. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt/windows/ui/xaml/printing/__init__.py +1 -1
  9. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt_Windows.UI.Xaml.Printing.egg-info/PKG-INFO +7 -7
  10. winrt_windows_ui_xaml_printing-2.2.0/winrt_Windows.UI.Xaml.Printing.egg-info/requires.txt +7 -0
  11. winrt_windows_ui_xaml_printing-2.1.0/all-requirements.txt +0 -6
  12. winrt_windows_ui_xaml_printing-2.1.0/pywinrt-version.txt +0 -1
  13. winrt_windows_ui_xaml_printing-2.1.0/winrt_Windows.UI.Xaml.Printing.egg-info/requires.txt +0 -7
  14. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/README.md +0 -0
  15. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/setup.cfg +0 -0
  16. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/setup.py +0 -0
  17. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt/windows/ui/xaml/printing/py.typed +0 -0
  18. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt_Windows.UI.Xaml.Printing.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt_Windows.UI.Xaml.Printing.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_ui_xaml_printing-2.1.0 → winrt_windows_ui_xaml_printing-2.2.0}/winrt_Windows.UI.Xaml.Printing.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Xaml.Printing
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,14 +10,14 @@ 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"
18
- Requires-Dist: winrt-Windows.Graphics.Printing[all]==2.1.0; extra == "all"
19
- Requires-Dist: winrt-Windows.UI.Core[all]==2.1.0; extra == "all"
20
- Requires-Dist: winrt-Windows.UI.Xaml[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Graphics.Printing[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.UI.Core[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.UI.Xaml[all]==2.2.0; extra == "all"
21
21
 
22
22
  <!-- warning: Please don't edit this file. It was automatically generated. -->
23
23
 
@@ -0,0 +1,6 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
+
3
+ winrt-Windows.Foundation[all]==2.2.0
4
+ winrt-Windows.Graphics.Printing[all]==2.2.0
5
+ winrt-Windows.UI.Core[all]==2.2.0
6
+ winrt-Windows.UI.Xaml[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.Printing.h"
4
4
 
@@ -19,7 +19,7 @@ namespace py::cpp::Windows::UI::Xaml::Printing
19
19
  {
20
20
  try
21
21
  {
22
- winrt::Windows::UI::Xaml::Printing::AddPagesEventArgs instance{ };
22
+ winrt::Windows::UI::Xaml::Printing::AddPagesEventArgs instance{};
23
23
  return py::wrap(instance, type);
24
24
  }
25
25
  catch (...)
@@ -47,7 +47,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
47
47
  {
48
48
  try
49
49
  {
50
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.AddPagesEventArgs", L"PrintTaskOptions"))
50
+ static std::optional<bool> is_property_present{};
51
+
52
+ if (!is_property_present.has_value())
53
+ {
54
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.AddPagesEventArgs", L"PrintTaskOptions");
55
+ }
56
+
57
+ if (!is_property_present.value())
51
58
  {
52
59
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
53
60
  return nullptr;
@@ -127,7 +134,7 @@ namespace py::cpp::Windows::UI::Xaml::Printing
127
134
  {
128
135
  try
129
136
  {
130
- winrt::Windows::UI::Xaml::Printing::GetPreviewPageEventArgs instance{ };
137
+ winrt::Windows::UI::Xaml::Printing::GetPreviewPageEventArgs instance{};
131
138
  return py::wrap(instance, type);
132
139
  }
133
140
  catch (...)
@@ -155,7 +162,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
155
162
  {
156
163
  try
157
164
  {
158
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.GetPreviewPageEventArgs", L"PageNumber"))
165
+ static std::optional<bool> is_property_present{};
166
+
167
+ if (!is_property_present.has_value())
168
+ {
169
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.GetPreviewPageEventArgs", L"PageNumber");
170
+ }
171
+
172
+ if (!is_property_present.value())
159
173
  {
160
174
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
161
175
  return nullptr;
@@ -235,7 +249,7 @@ namespace py::cpp::Windows::UI::Xaml::Printing
235
249
  {
236
250
  try
237
251
  {
238
- winrt::Windows::UI::Xaml::Printing::PaginateEventArgs instance{ };
252
+ winrt::Windows::UI::Xaml::Printing::PaginateEventArgs instance{};
239
253
  return py::wrap(instance, type);
240
254
  }
241
255
  catch (...)
@@ -263,7 +277,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
263
277
  {
264
278
  try
265
279
  {
266
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PaginateEventArgs", L"CurrentPreviewPageNumber"))
280
+ static std::optional<bool> is_property_present{};
281
+
282
+ if (!is_property_present.has_value())
283
+ {
284
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PaginateEventArgs", L"CurrentPreviewPageNumber");
285
+ }
286
+
287
+ if (!is_property_present.value())
267
288
  {
268
289
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
269
290
  return nullptr;
@@ -282,7 +303,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
282
303
  {
283
304
  try
284
305
  {
285
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PaginateEventArgs", L"PrintTaskOptions"))
306
+ static std::optional<bool> is_property_present{};
307
+
308
+ if (!is_property_present.has_value())
309
+ {
310
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PaginateEventArgs", L"PrintTaskOptions");
311
+ }
312
+
313
+ if (!is_property_present.value())
286
314
  {
287
315
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
288
316
  return nullptr;
@@ -363,7 +391,7 @@ namespace py::cpp::Windows::UI::Xaml::Printing
363
391
  {
364
392
  try
365
393
  {
366
- winrt::Windows::UI::Xaml::Printing::PrintDocument instance{ };
394
+ winrt::Windows::UI::Xaml::Printing::PrintDocument instance{};
367
395
  return py::wrap(instance, type);
368
396
  }
369
397
  catch (...)
@@ -395,7 +423,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
395
423
  {
396
424
  try
397
425
  {
398
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPage", 1))
426
+ static std::optional<bool> is_overload_present{};
427
+
428
+ if (!is_overload_present.has_value())
429
+ {
430
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPage", 1);
431
+ }
432
+
433
+ if (!is_overload_present.value())
399
434
  {
400
435
  py::set_arg_count_version_error(1);
401
436
  return nullptr;
@@ -427,7 +462,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
427
462
  {
428
463
  try
429
464
  {
430
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPagesComplete", 0))
465
+ static std::optional<bool> is_overload_present{};
466
+
467
+ if (!is_overload_present.has_value())
468
+ {
469
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPagesComplete", 0);
470
+ }
471
+
472
+ if (!is_overload_present.value())
431
473
  {
432
474
  py::set_arg_count_version_error(0);
433
475
  return nullptr;
@@ -457,7 +499,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
457
499
  {
458
500
  try
459
501
  {
460
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"ClearValue", 1))
502
+ static std::optional<bool> is_overload_present{};
503
+
504
+ if (!is_overload_present.has_value())
505
+ {
506
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"ClearValue", 1);
507
+ }
508
+
509
+ if (!is_overload_present.value())
461
510
  {
462
511
  py::set_arg_count_version_error(1);
463
512
  return nullptr;
@@ -489,7 +538,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
489
538
  {
490
539
  try
491
540
  {
492
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"GetAnimationBaseValue", 1))
541
+ static std::optional<bool> is_overload_present{};
542
+
543
+ if (!is_overload_present.has_value())
544
+ {
545
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"GetAnimationBaseValue", 1);
546
+ }
547
+
548
+ if (!is_overload_present.value())
493
549
  {
494
550
  py::set_arg_count_version_error(1);
495
551
  return nullptr;
@@ -520,7 +576,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
520
576
  {
521
577
  try
522
578
  {
523
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"GetValue", 1))
579
+ static std::optional<bool> is_overload_present{};
580
+
581
+ if (!is_overload_present.has_value())
582
+ {
583
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"GetValue", 1);
584
+ }
585
+
586
+ if (!is_overload_present.value())
524
587
  {
525
588
  py::set_arg_count_version_error(1);
526
589
  return nullptr;
@@ -551,7 +614,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
551
614
  {
552
615
  try
553
616
  {
554
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"InvalidatePreview", 0))
617
+ static std::optional<bool> is_overload_present{};
618
+
619
+ if (!is_overload_present.has_value())
620
+ {
621
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"InvalidatePreview", 0);
622
+ }
623
+
624
+ if (!is_overload_present.value())
555
625
  {
556
626
  py::set_arg_count_version_error(0);
557
627
  return nullptr;
@@ -581,7 +651,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
581
651
  {
582
652
  try
583
653
  {
584
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"ReadLocalValue", 1))
654
+ static std::optional<bool> is_overload_present{};
655
+
656
+ if (!is_overload_present.has_value())
657
+ {
658
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"ReadLocalValue", 1);
659
+ }
660
+
661
+ if (!is_overload_present.value())
585
662
  {
586
663
  py::set_arg_count_version_error(1);
587
664
  return nullptr;
@@ -612,7 +689,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
612
689
  {
613
690
  try
614
691
  {
615
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"RegisterPropertyChangedCallback", 2))
692
+ static std::optional<bool> is_overload_present{};
693
+
694
+ if (!is_overload_present.has_value())
695
+ {
696
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"RegisterPropertyChangedCallback", 2);
697
+ }
698
+
699
+ if (!is_overload_present.value())
616
700
  {
617
701
  py::set_arg_count_version_error(2);
618
702
  return nullptr;
@@ -644,7 +728,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
644
728
  {
645
729
  try
646
730
  {
647
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"SetPreviewPage", 2))
731
+ static std::optional<bool> is_overload_present{};
732
+
733
+ if (!is_overload_present.has_value())
734
+ {
735
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"SetPreviewPage", 2);
736
+ }
737
+
738
+ if (!is_overload_present.value())
648
739
  {
649
740
  py::set_arg_count_version_error(2);
650
741
  return nullptr;
@@ -677,7 +768,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
677
768
  {
678
769
  try
679
770
  {
680
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"SetPreviewPageCount", 2))
771
+ static std::optional<bool> is_overload_present{};
772
+
773
+ if (!is_overload_present.has_value())
774
+ {
775
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"SetPreviewPageCount", 2);
776
+ }
777
+
778
+ if (!is_overload_present.value())
681
779
  {
682
780
  py::set_arg_count_version_error(2);
683
781
  return nullptr;
@@ -710,7 +808,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
710
808
  {
711
809
  try
712
810
  {
713
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"SetValue", 2))
811
+ static std::optional<bool> is_overload_present{};
812
+
813
+ if (!is_overload_present.has_value())
814
+ {
815
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"SetValue", 2);
816
+ }
817
+
818
+ if (!is_overload_present.value())
714
819
  {
715
820
  py::set_arg_count_version_error(2);
716
821
  return nullptr;
@@ -743,7 +848,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
743
848
  {
744
849
  try
745
850
  {
746
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"UnregisterPropertyChangedCallback", 2))
851
+ static std::optional<bool> is_overload_present{};
852
+
853
+ if (!is_overload_present.has_value())
854
+ {
855
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.UI.Xaml.DependencyObject", L"UnregisterPropertyChangedCallback", 2);
856
+ }
857
+
858
+ if (!is_overload_present.value())
747
859
  {
748
860
  py::set_arg_count_version_error(2);
749
861
  return nullptr;
@@ -772,7 +884,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
772
884
  {
773
885
  try
774
886
  {
775
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"DocumentSource"))
887
+ static std::optional<bool> is_property_present{};
888
+
889
+ if (!is_property_present.has_value())
890
+ {
891
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"DocumentSource");
892
+ }
893
+
894
+ if (!is_property_present.value())
776
895
  {
777
896
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
778
897
  return nullptr;
@@ -791,7 +910,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
791
910
  {
792
911
  try
793
912
  {
794
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"DocumentSourceProperty"))
913
+ static std::optional<bool> is_property_present{};
914
+
915
+ if (!is_property_present.has_value())
916
+ {
917
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"DocumentSourceProperty");
918
+ }
919
+
920
+ if (!is_property_present.value())
795
921
  {
796
922
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
797
923
  return nullptr;
@@ -810,7 +936,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
810
936
  {
811
937
  try
812
938
  {
813
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.DependencyObject", L"Dispatcher"))
939
+ static std::optional<bool> is_property_present{};
940
+
941
+ if (!is_property_present.has_value())
942
+ {
943
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Xaml.DependencyObject", L"Dispatcher");
944
+ }
945
+
946
+ if (!is_property_present.value())
814
947
  {
815
948
  PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
816
949
  return nullptr;
@@ -829,7 +962,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
829
962
  {
830
963
  try
831
964
  {
832
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPages"))
965
+ static std::optional<bool> is_event_present{};
966
+
967
+ if (!is_event_present.has_value())
968
+ {
969
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPages");
970
+ }
971
+
972
+ if (!is_event_present.value())
833
973
  {
834
974
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
835
975
  return nullptr;
@@ -850,7 +990,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
850
990
  {
851
991
  try
852
992
  {
853
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPages"))
993
+ static std::optional<bool> is_event_present{};
994
+
995
+ if (!is_event_present.has_value())
996
+ {
997
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"AddPages");
998
+ }
999
+
1000
+ if (!is_event_present.value())
854
1001
  {
855
1002
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
856
1003
  return nullptr;
@@ -872,7 +1019,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
872
1019
  {
873
1020
  try
874
1021
  {
875
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"GetPreviewPage"))
1022
+ static std::optional<bool> is_event_present{};
1023
+
1024
+ if (!is_event_present.has_value())
1025
+ {
1026
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"GetPreviewPage");
1027
+ }
1028
+
1029
+ if (!is_event_present.value())
876
1030
  {
877
1031
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
878
1032
  return nullptr;
@@ -893,7 +1047,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
893
1047
  {
894
1048
  try
895
1049
  {
896
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"GetPreviewPage"))
1050
+ static std::optional<bool> is_event_present{};
1051
+
1052
+ if (!is_event_present.has_value())
1053
+ {
1054
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"GetPreviewPage");
1055
+ }
1056
+
1057
+ if (!is_event_present.value())
897
1058
  {
898
1059
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
899
1060
  return nullptr;
@@ -915,7 +1076,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
915
1076
  {
916
1077
  try
917
1078
  {
918
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"Paginate"))
1079
+ static std::optional<bool> is_event_present{};
1080
+
1081
+ if (!is_event_present.has_value())
1082
+ {
1083
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"Paginate");
1084
+ }
1085
+
1086
+ if (!is_event_present.value())
919
1087
  {
920
1088
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
921
1089
  return nullptr;
@@ -936,7 +1104,14 @@ namespace py::cpp::Windows::UI::Xaml::Printing
936
1104
  {
937
1105
  try
938
1106
  {
939
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"Paginate"))
1107
+ static std::optional<bool> is_event_present{};
1108
+
1109
+ if (!is_event_present.has_value())
1110
+ {
1111
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Xaml.Printing.PrintDocument", L"Paginate");
1112
+ }
1113
+
1114
+ if (!is_event_present.value())
940
1115
  {
941
1116
  PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
942
1117
  return nullptr;
@@ -1094,17 +1269,20 @@ PyMODINIT_FUNC PyInit__winrt_windows_ui_xaml_printing(void) noexcept
1094
1269
  return nullptr;
1095
1270
  }
1096
1271
 
1097
- if (py::register_python_type(module.get(), &type_spec_AddPagesEventArgs, object_bases.get(), nullptr) == -1)
1272
+ py::pytype_handle AddPagesEventArgs_type{py::register_python_type(module.get(), &type_spec_AddPagesEventArgs, object_bases.get(), nullptr)};
1273
+ if (!AddPagesEventArgs_type)
1098
1274
  {
1099
1275
  return nullptr;
1100
1276
  }
1101
1277
 
1102
- if (py::register_python_type(module.get(), &type_spec_GetPreviewPageEventArgs, object_bases.get(), nullptr) == -1)
1278
+ py::pytype_handle GetPreviewPageEventArgs_type{py::register_python_type(module.get(), &type_spec_GetPreviewPageEventArgs, object_bases.get(), nullptr)};
1279
+ if (!GetPreviewPageEventArgs_type)
1103
1280
  {
1104
1281
  return nullptr;
1105
1282
  }
1106
1283
 
1107
- if (py::register_python_type(module.get(), &type_spec_PaginateEventArgs, object_bases.get(), nullptr) == -1)
1284
+ py::pytype_handle PaginateEventArgs_type{py::register_python_type(module.get(), &type_spec_PaginateEventArgs, object_bases.get(), nullptr)};
1285
+ if (!PaginateEventArgs_type)
1108
1286
  {
1109
1287
  return nullptr;
1110
1288
  }
@@ -1115,7 +1293,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_ui_xaml_printing(void) noexcept
1115
1293
  return nullptr;
1116
1294
  }
1117
1295
 
1118
- if (py::register_python_type(module.get(), &type_spec_PrintDocument, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PrintDocument_Static.get())) == -1)
1296
+ py::pytype_handle PrintDocument_type{py::register_python_type(module.get(), &type_spec_PrintDocument, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_PrintDocument_Static.get()))};
1297
+ if (!PrintDocument_type)
1119
1298
  {
1120
1299
  return nullptr;
1121
1300
  }
@@ -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
@@ -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.Printing
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,14 +10,14 @@ 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"
18
- Requires-Dist: winrt-Windows.Graphics.Printing[all]==2.1.0; extra == "all"
19
- Requires-Dist: winrt-Windows.UI.Core[all]==2.1.0; extra == "all"
20
- Requires-Dist: winrt-Windows.UI.Xaml[all]==2.1.0; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Graphics.Printing[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.UI.Core[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.UI.Xaml[all]==2.2.0; extra == "all"
21
21
 
22
22
  <!-- warning: Please don't edit this file. It was automatically generated. -->
23
23
 
@@ -0,0 +1,7 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
5
+ winrt-Windows.Graphics.Printing[all]==2.2.0
6
+ winrt-Windows.UI.Core[all]==2.2.0
7
+ winrt-Windows.UI.Xaml[all]==2.2.0
@@ -1,6 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0
2
-
3
- winrt-Windows.Foundation[all]==2.1.0
4
- winrt-Windows.Graphics.Printing[all]==2.1.0
5
- winrt-Windows.UI.Core[all]==2.1.0
6
- winrt-Windows.UI.Xaml[all]==2.1.0
@@ -1,7 +0,0 @@
1
- winrt-runtime==2.1.0
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.1.0
5
- winrt-Windows.Graphics.Printing[all]==2.1.0
6
- winrt-Windows.UI.Core[all]==2.1.0
7
- winrt-Windows.UI.Xaml[all]==2.1.0