winrt-Windows.ApplicationModel.Preview.Notes 2.0.1__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_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/PKG-INFO +6 -6
  2. winrt_windows_applicationmodel_preview_notes-2.2.0/all-requirements.txt +5 -0
  3. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/py.Windows.ApplicationModel.Preview.Notes.cpp +362 -197
  4. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_applicationmodel_preview_notes-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt/_winrt_windows_applicationmodel_preview_notes.pyi +17 -17
  8. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt/windows/applicationmodel/preview/notes/__init__.py +1 -1
  9. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt_Windows.ApplicationModel.Preview.Notes.egg-info/PKG-INFO +6 -6
  10. winrt_windows_applicationmodel_preview_notes-2.2.0/winrt_Windows.ApplicationModel.Preview.Notes.egg-info/requires.txt +6 -0
  11. winrt_windows_applicationmodel_preview_notes-2.0.1/all-requirements.txt +0 -5
  12. winrt_windows_applicationmodel_preview_notes-2.0.1/pywinrt-version.txt +0 -1
  13. winrt_windows_applicationmodel_preview_notes-2.0.1/winrt_Windows.ApplicationModel.Preview.Notes.egg-info/requires.txt +0 -6
  14. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/README.md +0 -0
  15. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/setup.cfg +0 -0
  16. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/setup.py +0 -0
  17. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt/windows/applicationmodel/preview/notes/py.typed +0 -0
  18. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt_Windows.ApplicationModel.Preview.Notes.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt_Windows.ApplicationModel.Preview.Notes.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_applicationmodel_preview_notes-2.0.1 → winrt_windows_applicationmodel_preview_notes-2.2.0}/winrt_Windows.ApplicationModel.Preview.Notes.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.ApplicationModel.Preview.Notes
3
- Version: 2.0.1
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,13 +10,13 @@ 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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Graphics.Imaging[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Graphics.Imaging[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.2.0; extra == "all"
20
20
 
21
21
  <!-- warning: Please don't edit this file. It was automatically generated. -->
22
22
 
@@ -0,0 +1,5 @@
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.Imaging[all]==2.2.0
5
+ winrt-Windows.Storage.Streams[all]==2.2.0
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.ApplicationModel.Preview.Notes.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::ApplicationModel::Preview::Notes
7
6
  {
8
7
  // ----- NotePlacementChangedPreviewEventArgs class --------------------
@@ -24,14 +23,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
24
23
 
25
24
  static PyObject* NotePlacementChangedPreviewEventArgs_get_ViewId(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotePlacementChangedPreviewEventArgs* self, void* /*unused*/) noexcept
26
25
  {
27
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotePlacementChangedPreviewEventArgs", L"ViewId"))
28
- {
29
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
30
- return nullptr;
31
- }
32
-
33
26
  try
34
27
  {
28
+ static std::optional<bool> is_property_present{};
29
+
30
+ if (!is_property_present.has_value())
31
+ {
32
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotePlacementChangedPreviewEventArgs", L"ViewId");
33
+ }
34
+
35
+ if (!is_property_present.value())
36
+ {
37
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
38
+ return nullptr;
39
+ }
40
+
35
41
  return py::convert(self->obj.ViewId());
36
42
  }
37
43
  catch (...)
@@ -76,23 +82,20 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
76
82
  { }
77
83
  };
78
84
 
79
- static PyType_Slot _type_slots_NotePlacementChangedPreviewEventArgs[] =
80
- {
85
+ static PyType_Slot _type_slots_NotePlacementChangedPreviewEventArgs[] = {
81
86
  { Py_tp_new, reinterpret_cast<void*>(_new_NotePlacementChangedPreviewEventArgs) },
82
87
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_NotePlacementChangedPreviewEventArgs) },
83
88
  { Py_tp_methods, reinterpret_cast<void*>(_methods_NotePlacementChangedPreviewEventArgs) },
84
89
  { Py_tp_getset, reinterpret_cast<void*>(_getset_NotePlacementChangedPreviewEventArgs) },
85
- { },
90
+ { }
86
91
  };
87
92
 
88
- static PyType_Spec type_spec_NotePlacementChangedPreviewEventArgs =
89
- {
93
+ static PyType_Spec type_spec_NotePlacementChangedPreviewEventArgs = {
90
94
  "winrt._winrt_windows_applicationmodel_preview_notes.NotePlacementChangedPreviewEventArgs",
91
95
  sizeof(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotePlacementChangedPreviewEventArgs),
92
96
  0,
93
97
  Py_TPFLAGS_DEFAULT,
94
- _type_slots_NotePlacementChangedPreviewEventArgs
95
- };
98
+ _type_slots_NotePlacementChangedPreviewEventArgs};
96
99
 
97
100
  // ----- NoteVisibilityChangedPreviewEventArgs class --------------------
98
101
 
@@ -113,14 +116,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
113
116
 
114
117
  static PyObject* NoteVisibilityChangedPreviewEventArgs_get_IsVisible(py::wrapper::Windows::ApplicationModel::Preview::Notes::NoteVisibilityChangedPreviewEventArgs* self, void* /*unused*/) noexcept
115
118
  {
116
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs", L"IsVisible"))
117
- {
118
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
119
- return nullptr;
120
- }
121
-
122
119
  try
123
120
  {
121
+ static std::optional<bool> is_property_present{};
122
+
123
+ if (!is_property_present.has_value())
124
+ {
125
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs", L"IsVisible");
126
+ }
127
+
128
+ if (!is_property_present.value())
129
+ {
130
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
131
+ return nullptr;
132
+ }
133
+
124
134
  return py::convert(self->obj.IsVisible());
125
135
  }
126
136
  catch (...)
@@ -132,14 +142,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
132
142
 
133
143
  static PyObject* NoteVisibilityChangedPreviewEventArgs_get_ViewId(py::wrapper::Windows::ApplicationModel::Preview::Notes::NoteVisibilityChangedPreviewEventArgs* self, void* /*unused*/) noexcept
134
144
  {
135
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs", L"ViewId"))
136
- {
137
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
138
- return nullptr;
139
- }
140
-
141
145
  try
142
146
  {
147
+ static std::optional<bool> is_property_present{};
148
+
149
+ if (!is_property_present.has_value())
150
+ {
151
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs", L"ViewId");
152
+ }
153
+
154
+ if (!is_property_present.value())
155
+ {
156
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
157
+ return nullptr;
158
+ }
159
+
143
160
  return py::convert(self->obj.ViewId());
144
161
  }
145
162
  catch (...)
@@ -185,23 +202,20 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
185
202
  { }
186
203
  };
187
204
 
188
- static PyType_Slot _type_slots_NoteVisibilityChangedPreviewEventArgs[] =
189
- {
205
+ static PyType_Slot _type_slots_NoteVisibilityChangedPreviewEventArgs[] = {
190
206
  { Py_tp_new, reinterpret_cast<void*>(_new_NoteVisibilityChangedPreviewEventArgs) },
191
207
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_NoteVisibilityChangedPreviewEventArgs) },
192
208
  { Py_tp_methods, reinterpret_cast<void*>(_methods_NoteVisibilityChangedPreviewEventArgs) },
193
209
  { Py_tp_getset, reinterpret_cast<void*>(_getset_NoteVisibilityChangedPreviewEventArgs) },
194
- { },
210
+ { }
195
211
  };
196
212
 
197
- static PyType_Spec type_spec_NoteVisibilityChangedPreviewEventArgs =
198
- {
213
+ static PyType_Spec type_spec_NoteVisibilityChangedPreviewEventArgs = {
199
214
  "winrt._winrt_windows_applicationmodel_preview_notes.NoteVisibilityChangedPreviewEventArgs",
200
215
  sizeof(py::wrapper::Windows::ApplicationModel::Preview::Notes::NoteVisibilityChangedPreviewEventArgs),
201
216
  0,
202
217
  Py_TPFLAGS_DEFAULT,
203
- _type_slots_NoteVisibilityChangedPreviewEventArgs
204
- };
218
+ _type_slots_NoteVisibilityChangedPreviewEventArgs};
205
219
 
206
220
  // ----- NotesWindowManagerPreview class --------------------
207
221
 
@@ -226,14 +240,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
226
240
 
227
241
  if (arg_count == 0)
228
242
  {
229
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"GetForCurrentApp", 0))
230
- {
231
- py::set_arg_count_version_error(0);
232
- return nullptr;
233
- }
234
-
235
243
  try
236
244
  {
245
+ static std::optional<bool> is_overload_present{};
246
+
247
+ if (!is_overload_present.has_value())
248
+ {
249
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"GetForCurrentApp", 0);
250
+ }
251
+
252
+ if (!is_overload_present.value())
253
+ {
254
+ py::set_arg_count_version_error(0);
255
+ return nullptr;
256
+ }
257
+
237
258
  return py::convert(winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview::GetForCurrentApp());
238
259
  }
239
260
  catch (...)
@@ -255,14 +276,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
255
276
 
256
277
  if (arg_count == 1)
257
278
  {
258
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"GetNotePlacement", 1))
259
- {
260
- py::set_arg_count_version_error(1);
261
- return nullptr;
262
- }
263
-
264
279
  try
265
280
  {
281
+ static std::optional<bool> is_overload_present{};
282
+
283
+ if (!is_overload_present.has_value())
284
+ {
285
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"GetNotePlacement", 1);
286
+ }
287
+
288
+ if (!is_overload_present.value())
289
+ {
290
+ py::set_arg_count_version_error(1);
291
+ return nullptr;
292
+ }
293
+
266
294
  auto param0 = py::convert_to<int32_t>(args, 0);
267
295
 
268
296
  return py::convert(self->obj.GetNotePlacement(param0));
@@ -286,14 +314,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
286
314
 
287
315
  if (arg_count == 1)
288
316
  {
289
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"HideNote", 1))
290
- {
291
- py::set_arg_count_version_error(1);
292
- return nullptr;
293
- }
294
-
295
317
  try
296
318
  {
319
+ static std::optional<bool> is_overload_present{};
320
+
321
+ if (!is_overload_present.has_value())
322
+ {
323
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"HideNote", 1);
324
+ }
325
+
326
+ if (!is_overload_present.value())
327
+ {
328
+ py::set_arg_count_version_error(1);
329
+ return nullptr;
330
+ }
331
+
297
332
  auto param0 = py::convert_to<int32_t>(args, 0);
298
333
 
299
334
  self->obj.HideNote(param0);
@@ -318,14 +353,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
318
353
 
319
354
  if (arg_count == 0)
320
355
  {
321
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetFocusToNextView", 0))
322
- {
323
- py::set_arg_count_version_error(0);
324
- return nullptr;
325
- }
326
-
327
356
  try
328
357
  {
358
+ static std::optional<bool> is_overload_present{};
359
+
360
+ if (!is_overload_present.has_value())
361
+ {
362
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetFocusToNextView", 0);
363
+ }
364
+
365
+ if (!is_overload_present.value())
366
+ {
367
+ py::set_arg_count_version_error(0);
368
+ return nullptr;
369
+ }
370
+
329
371
  self->obj.SetFocusToNextView();
330
372
  Py_RETURN_NONE;
331
373
  }
@@ -348,14 +390,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
348
390
 
349
391
  if (arg_count == 0)
350
392
  {
351
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetFocusToPreviousView", 0))
352
- {
353
- py::set_arg_count_version_error(0);
354
- return nullptr;
355
- }
356
-
357
393
  try
358
394
  {
395
+ static std::optional<bool> is_overload_present{};
396
+
397
+ if (!is_overload_present.has_value())
398
+ {
399
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetFocusToPreviousView", 0);
400
+ }
401
+
402
+ if (!is_overload_present.value())
403
+ {
404
+ py::set_arg_count_version_error(0);
405
+ return nullptr;
406
+ }
407
+
359
408
  self->obj.SetFocusToPreviousView();
360
409
  Py_RETURN_NONE;
361
410
  }
@@ -378,14 +427,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
378
427
 
379
428
  if (arg_count == 1)
380
429
  {
381
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetNotesThumbnailAsync", 1))
382
- {
383
- py::set_arg_count_version_error(1);
384
- return nullptr;
385
- }
386
-
387
430
  try
388
431
  {
432
+ static std::optional<bool> is_overload_present{};
433
+
434
+ if (!is_overload_present.has_value())
435
+ {
436
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetNotesThumbnailAsync", 1);
437
+ }
438
+
439
+ if (!is_overload_present.value())
440
+ {
441
+ py::set_arg_count_version_error(1);
442
+ return nullptr;
443
+ }
444
+
389
445
  auto param0 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 0);
390
446
 
391
447
  return py::convert(self->obj.SetNotesThumbnailAsync(param0));
@@ -409,14 +465,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
409
465
 
410
466
  if (arg_count == 1)
411
467
  {
412
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetThumbnailImageForTaskSwitcherAsync", 1))
413
- {
414
- py::set_arg_count_version_error(1);
415
- return nullptr;
416
- }
417
-
418
468
  try
419
469
  {
470
+ static std::optional<bool> is_overload_present{};
471
+
472
+ if (!is_overload_present.has_value())
473
+ {
474
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SetThumbnailImageForTaskSwitcherAsync", 1);
475
+ }
476
+
477
+ if (!is_overload_present.value())
478
+ {
479
+ py::set_arg_count_version_error(1);
480
+ return nullptr;
481
+ }
482
+
420
483
  auto param0 = py::convert_to<winrt::Windows::Graphics::Imaging::SoftwareBitmap>(args, 0);
421
484
 
422
485
  return py::convert(self->obj.SetThumbnailImageForTaskSwitcherAsync(param0));
@@ -440,14 +503,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
440
503
 
441
504
  if (arg_count == 1)
442
505
  {
443
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNote", 1))
444
- {
445
- py::set_arg_count_version_error(1);
446
- return nullptr;
447
- }
448
-
449
506
  try
450
507
  {
508
+ static std::optional<bool> is_overload_present{};
509
+
510
+ if (!is_overload_present.has_value())
511
+ {
512
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNote", 1);
513
+ }
514
+
515
+ if (!is_overload_present.value())
516
+ {
517
+ py::set_arg_count_version_error(1);
518
+ return nullptr;
519
+ }
520
+
451
521
  auto param0 = py::convert_to<int32_t>(args, 0);
452
522
 
453
523
  self->obj.ShowNote(param0);
@@ -472,14 +542,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
472
542
 
473
543
  if (arg_count == 2)
474
544
  {
475
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteRelativeTo", 2))
476
- {
477
- py::set_arg_count_version_error(2);
478
- return nullptr;
479
- }
480
-
481
545
  try
482
546
  {
547
+ static std::optional<bool> is_overload_present{};
548
+
549
+ if (!is_overload_present.has_value())
550
+ {
551
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteRelativeTo", 2);
552
+ }
553
+
554
+ if (!is_overload_present.value())
555
+ {
556
+ py::set_arg_count_version_error(2);
557
+ return nullptr;
558
+ }
559
+
483
560
  auto param0 = py::convert_to<int32_t>(args, 0);
484
561
  auto param1 = py::convert_to<int32_t>(args, 1);
485
562
 
@@ -494,14 +571,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
494
571
  }
495
572
  else if (arg_count == 3)
496
573
  {
497
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteRelativeTo", 3))
498
- {
499
- py::set_arg_count_version_error(3);
500
- return nullptr;
501
- }
502
-
503
574
  try
504
575
  {
576
+ static std::optional<bool> is_overload_present{};
577
+
578
+ if (!is_overload_present.has_value())
579
+ {
580
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteRelativeTo", 3);
581
+ }
582
+
583
+ if (!is_overload_present.value())
584
+ {
585
+ py::set_arg_count_version_error(3);
586
+ return nullptr;
587
+ }
588
+
505
589
  auto param0 = py::convert_to<int32_t>(args, 0);
506
590
  auto param1 = py::convert_to<int32_t>(args, 1);
507
591
  auto param2 = py::convert_to<winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions>(args, 2);
@@ -528,14 +612,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
528
612
 
529
613
  if (arg_count == 2)
530
614
  {
531
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteWithPlacement", 2))
532
- {
533
- py::set_arg_count_version_error(2);
534
- return nullptr;
535
- }
536
-
537
615
  try
538
616
  {
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.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteWithPlacement", 2);
622
+ }
623
+
624
+ if (!is_overload_present.value())
625
+ {
626
+ py::set_arg_count_version_error(2);
627
+ return nullptr;
628
+ }
629
+
539
630
  auto param0 = py::convert_to<int32_t>(args, 0);
540
631
  auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 1);
541
632
 
@@ -550,14 +641,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
550
641
  }
551
642
  else if (arg_count == 3)
552
643
  {
553
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteWithPlacement", 3))
554
- {
555
- py::set_arg_count_version_error(3);
556
- return nullptr;
557
- }
558
-
559
644
  try
560
645
  {
646
+ static std::optional<bool> is_overload_present{};
647
+
648
+ if (!is_overload_present.has_value())
649
+ {
650
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"ShowNoteWithPlacement", 3);
651
+ }
652
+
653
+ if (!is_overload_present.value())
654
+ {
655
+ py::set_arg_count_version_error(3);
656
+ return nullptr;
657
+ }
658
+
561
659
  auto param0 = py::convert_to<int32_t>(args, 0);
562
660
  auto param1 = py::convert_to<winrt::Windows::Storage::Streams::IBuffer>(args, 1);
563
661
  auto param2 = py::convert_to<winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions>(args, 2);
@@ -584,14 +682,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
584
682
 
585
683
  if (arg_count == 2)
586
684
  {
587
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"TrySetNoteSize", 2))
588
- {
589
- py::set_arg_count_version_error(2);
590
- return nullptr;
591
- }
592
-
593
685
  try
594
686
  {
687
+ static std::optional<bool> is_overload_present{};
688
+
689
+ if (!is_overload_present.has_value())
690
+ {
691
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"TrySetNoteSize", 2);
692
+ }
693
+
694
+ if (!is_overload_present.value())
695
+ {
696
+ py::set_arg_count_version_error(2);
697
+ return nullptr;
698
+ }
699
+
595
700
  auto param0 = py::convert_to<int32_t>(args, 0);
596
701
  auto param1 = py::convert_to<winrt::Windows::Foundation::Size>(args, 1);
597
702
 
@@ -612,14 +717,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
612
717
 
613
718
  static PyObject* NotesWindowManagerPreview_get_IsScreenLocked(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, void* /*unused*/) noexcept
614
719
  {
615
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"IsScreenLocked"))
616
- {
617
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
618
- return nullptr;
619
- }
620
-
621
720
  try
622
721
  {
722
+ static std::optional<bool> is_property_present{};
723
+
724
+ if (!is_property_present.has_value())
725
+ {
726
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"IsScreenLocked");
727
+ }
728
+
729
+ if (!is_property_present.value())
730
+ {
731
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
732
+ return nullptr;
733
+ }
734
+
623
735
  return py::convert(self->obj.IsScreenLocked());
624
736
  }
625
737
  catch (...)
@@ -631,14 +743,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
631
743
 
632
744
  static PyObject* NotesWindowManagerPreview_add_NotePlacementChanged(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, PyObject* arg) noexcept
633
745
  {
634
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NotePlacementChanged"))
635
- {
636
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
637
- return nullptr;
638
- }
639
-
640
746
  try
641
747
  {
748
+ static std::optional<bool> is_event_present{};
749
+
750
+ if (!is_event_present.has_value())
751
+ {
752
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NotePlacementChanged");
753
+ }
754
+
755
+ if (!is_event_present.value())
756
+ {
757
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
758
+ return nullptr;
759
+ }
760
+
642
761
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview, winrt::Windows::ApplicationModel::Preview::Notes::NotePlacementChangedPreviewEventArgs>>(arg);
643
762
 
644
763
  return py::convert(self->obj.NotePlacementChanged(param0));
@@ -652,14 +771,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
652
771
 
653
772
  static PyObject* NotesWindowManagerPreview_remove_NotePlacementChanged(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, PyObject* arg) noexcept
654
773
  {
655
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NotePlacementChanged"))
656
- {
657
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
658
- return nullptr;
659
- }
660
-
661
774
  try
662
775
  {
776
+ static std::optional<bool> is_event_present{};
777
+
778
+ if (!is_event_present.has_value())
779
+ {
780
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NotePlacementChanged");
781
+ }
782
+
783
+ if (!is_event_present.value())
784
+ {
785
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
786
+ return nullptr;
787
+ }
788
+
663
789
  auto param0 = py::convert_to<winrt::event_token>(arg);
664
790
 
665
791
  self->obj.NotePlacementChanged(param0);
@@ -674,14 +800,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
674
800
 
675
801
  static PyObject* NotesWindowManagerPreview_add_NoteVisibilityChanged(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, PyObject* arg) noexcept
676
802
  {
677
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NoteVisibilityChanged"))
678
- {
679
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
680
- return nullptr;
681
- }
682
-
683
803
  try
684
804
  {
805
+ static std::optional<bool> is_event_present{};
806
+
807
+ if (!is_event_present.has_value())
808
+ {
809
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NoteVisibilityChanged");
810
+ }
811
+
812
+ if (!is_event_present.value())
813
+ {
814
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
815
+ return nullptr;
816
+ }
817
+
685
818
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview, winrt::Windows::ApplicationModel::Preview::Notes::NoteVisibilityChangedPreviewEventArgs>>(arg);
686
819
 
687
820
  return py::convert(self->obj.NoteVisibilityChanged(param0));
@@ -695,14 +828,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
695
828
 
696
829
  static PyObject* NotesWindowManagerPreview_remove_NoteVisibilityChanged(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, PyObject* arg) noexcept
697
830
  {
698
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NoteVisibilityChanged"))
699
- {
700
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
701
- return nullptr;
702
- }
703
-
704
831
  try
705
832
  {
833
+ static std::optional<bool> is_event_present{};
834
+
835
+ if (!is_event_present.has_value())
836
+ {
837
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"NoteVisibilityChanged");
838
+ }
839
+
840
+ if (!is_event_present.value())
841
+ {
842
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
843
+ return nullptr;
844
+ }
845
+
706
846
  auto param0 = py::convert_to<winrt::event_token>(arg);
707
847
 
708
848
  self->obj.NoteVisibilityChanged(param0);
@@ -717,14 +857,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
717
857
 
718
858
  static PyObject* NotesWindowManagerPreview_add_SystemLockStateChanged(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, PyObject* arg) noexcept
719
859
  {
720
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SystemLockStateChanged"))
721
- {
722
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
723
- return nullptr;
724
- }
725
-
726
860
  try
727
861
  {
862
+ static std::optional<bool> is_event_present{};
863
+
864
+ if (!is_event_present.has_value())
865
+ {
866
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SystemLockStateChanged");
867
+ }
868
+
869
+ if (!is_event_present.value())
870
+ {
871
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
872
+ return nullptr;
873
+ }
874
+
728
875
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview, winrt::Windows::Foundation::IInspectable>>(arg);
729
876
 
730
877
  return py::convert(self->obj.SystemLockStateChanged(param0));
@@ -738,14 +885,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
738
885
 
739
886
  static PyObject* NotesWindowManagerPreview_remove_SystemLockStateChanged(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview* self, PyObject* arg) noexcept
740
887
  {
741
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SystemLockStateChanged"))
742
- {
743
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
744
- return nullptr;
745
- }
746
-
747
888
  try
748
889
  {
890
+ static std::optional<bool> is_event_present{};
891
+
892
+ if (!is_event_present.has_value())
893
+ {
894
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview", L"SystemLockStateChanged");
895
+ }
896
+
897
+ if (!is_event_present.value())
898
+ {
899
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
900
+ return nullptr;
901
+ }
902
+
749
903
  auto param0 = py::convert_to<winrt::event_token>(arg);
750
904
 
751
905
  self->obj.SystemLockStateChanged(param0);
@@ -809,23 +963,20 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
809
963
  { }
810
964
  };
811
965
 
812
- static PyType_Slot _type_slots_NotesWindowManagerPreview[] =
813
- {
966
+ static PyType_Slot _type_slots_NotesWindowManagerPreview[] = {
814
967
  { Py_tp_new, reinterpret_cast<void*>(_new_NotesWindowManagerPreview) },
815
968
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_NotesWindowManagerPreview) },
816
969
  { Py_tp_methods, reinterpret_cast<void*>(_methods_NotesWindowManagerPreview) },
817
970
  { Py_tp_getset, reinterpret_cast<void*>(_getset_NotesWindowManagerPreview) },
818
- { },
971
+ { }
819
972
  };
820
973
 
821
- static PyType_Spec type_spec_NotesWindowManagerPreview =
822
- {
974
+ static PyType_Spec type_spec_NotesWindowManagerPreview = {
823
975
  "winrt._winrt_windows_applicationmodel_preview_notes.NotesWindowManagerPreview",
824
976
  sizeof(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreview),
825
977
  0,
826
978
  Py_TPFLAGS_DEFAULT,
827
- _type_slots_NotesWindowManagerPreview
828
- };
979
+ _type_slots_NotesWindowManagerPreview};
829
980
 
830
981
  static PyGetSetDef getset_NotesWindowManagerPreview_Static[] = {
831
982
  { }
@@ -868,7 +1019,7 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
868
1019
  {
869
1020
  try
870
1021
  {
871
- winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions instance{ };
1022
+ winrt::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions instance{};
872
1023
  return py::wrap(instance, type);
873
1024
  }
874
1025
  catch (...)
@@ -894,14 +1045,21 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
894
1045
 
895
1046
  static PyObject* NotesWindowManagerPreviewShowNoteOptions_get_ShowWithFocus(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions* self, void* /*unused*/) noexcept
896
1047
  {
897
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions", L"ShowWithFocus"))
898
- {
899
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
900
- return nullptr;
901
- }
902
-
903
1048
  try
904
1049
  {
1050
+ static std::optional<bool> is_property_present{};
1051
+
1052
+ if (!is_property_present.has_value())
1053
+ {
1054
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions", L"ShowWithFocus");
1055
+ }
1056
+
1057
+ if (!is_property_present.value())
1058
+ {
1059
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1060
+ return nullptr;
1061
+ }
1062
+
905
1063
  return py::convert(self->obj.ShowWithFocus());
906
1064
  }
907
1065
  catch (...)
@@ -913,12 +1071,6 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
913
1071
 
914
1072
  static int NotesWindowManagerPreviewShowNoteOptions_put_ShowWithFocus(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions* self, PyObject* arg, void* /*unused*/) noexcept
915
1073
  {
916
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions", L"ShowWithFocus"))
917
- {
918
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
919
- return -1;
920
- }
921
-
922
1074
  if (arg == nullptr)
923
1075
  {
924
1076
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -927,6 +1079,19 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
927
1079
 
928
1080
  try
929
1081
  {
1082
+ static std::optional<bool> is_property_present{};
1083
+
1084
+ if (!is_property_present.has_value())
1085
+ {
1086
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions", L"ShowWithFocus");
1087
+ }
1088
+
1089
+ if (!is_property_present.value())
1090
+ {
1091
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1092
+ return -1;
1093
+ }
1094
+
930
1095
  auto param0 = py::convert_to<bool>(arg);
931
1096
 
932
1097
  self->obj.ShowWithFocus(param0);
@@ -974,39 +1139,35 @@ namespace py::cpp::Windows::ApplicationModel::Preview::Notes
974
1139
  { }
975
1140
  };
976
1141
 
977
- static PyType_Slot _type_slots_NotesWindowManagerPreviewShowNoteOptions[] =
978
- {
1142
+ static PyType_Slot _type_slots_NotesWindowManagerPreviewShowNoteOptions[] = {
979
1143
  { Py_tp_new, reinterpret_cast<void*>(_new_NotesWindowManagerPreviewShowNoteOptions) },
980
1144
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_NotesWindowManagerPreviewShowNoteOptions) },
981
1145
  { Py_tp_methods, reinterpret_cast<void*>(_methods_NotesWindowManagerPreviewShowNoteOptions) },
982
1146
  { Py_tp_getset, reinterpret_cast<void*>(_getset_NotesWindowManagerPreviewShowNoteOptions) },
983
- { },
1147
+ { }
984
1148
  };
985
1149
 
986
- static PyType_Spec type_spec_NotesWindowManagerPreviewShowNoteOptions =
987
- {
1150
+ static PyType_Spec type_spec_NotesWindowManagerPreviewShowNoteOptions = {
988
1151
  "winrt._winrt_windows_applicationmodel_preview_notes.NotesWindowManagerPreviewShowNoteOptions",
989
1152
  sizeof(py::wrapper::Windows::ApplicationModel::Preview::Notes::NotesWindowManagerPreviewShowNoteOptions),
990
1153
  0,
991
1154
  Py_TPFLAGS_DEFAULT,
992
- _type_slots_NotesWindowManagerPreviewShowNoteOptions
993
- };
1155
+ _type_slots_NotesWindowManagerPreviewShowNoteOptions};
994
1156
 
995
1157
  // ----- Windows.ApplicationModel.Preview.Notes Initialization --------------------
996
- PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Preview::Notes");
997
-
998
1158
 
999
- static PyModuleDef module_def
1000
- = {PyModuleDef_HEAD_INIT,
1001
- "_winrt_windows_applicationmodel_preview_notes",
1002
- module_doc,
1003
- 0,
1004
- nullptr,
1005
- nullptr,
1006
- nullptr,
1007
- nullptr,
1008
- nullptr};
1159
+ PyDoc_STRVAR(module_doc, "Windows.ApplicationModel.Preview.Notes");
1009
1160
 
1161
+ static PyModuleDef module_def = {
1162
+ PyModuleDef_HEAD_INIT,
1163
+ "_winrt_windows_applicationmodel_preview_notes",
1164
+ module_doc,
1165
+ 0,
1166
+ nullptr,
1167
+ nullptr,
1168
+ nullptr,
1169
+ nullptr,
1170
+ nullptr};
1010
1171
  } // py::cpp::Windows::ApplicationModel::Preview::Notes
1011
1172
 
1012
1173
  PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_preview_notes(void) noexcept
@@ -1038,12 +1199,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_preview_notes(void) noexce
1038
1199
  return nullptr;
1039
1200
  }
1040
1201
 
1041
- if (py::register_python_type(module.get(), &type_spec_NotePlacementChangedPreviewEventArgs, object_bases.get(), nullptr) == -1)
1202
+ py::pytype_handle NotePlacementChangedPreviewEventArgs_type{py::register_python_type(module.get(), &type_spec_NotePlacementChangedPreviewEventArgs, object_bases.get(), nullptr)};
1203
+ if (!NotePlacementChangedPreviewEventArgs_type)
1042
1204
  {
1043
1205
  return nullptr;
1044
1206
  }
1045
1207
 
1046
- if (py::register_python_type(module.get(), &type_spec_NoteVisibilityChangedPreviewEventArgs, object_bases.get(), nullptr) == -1)
1208
+ py::pytype_handle NoteVisibilityChangedPreviewEventArgs_type{py::register_python_type(module.get(), &type_spec_NoteVisibilityChangedPreviewEventArgs, object_bases.get(), nullptr)};
1209
+ if (!NoteVisibilityChangedPreviewEventArgs_type)
1047
1210
  {
1048
1211
  return nullptr;
1049
1212
  }
@@ -1054,12 +1217,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_preview_notes(void) noexce
1054
1217
  return nullptr;
1055
1218
  }
1056
1219
 
1057
- if (py::register_python_type(module.get(), &type_spec_NotesWindowManagerPreview, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_NotesWindowManagerPreview_Static.get())) == -1)
1220
+ py::pytype_handle NotesWindowManagerPreview_type{py::register_python_type(module.get(), &type_spec_NotesWindowManagerPreview, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_NotesWindowManagerPreview_Static.get()))};
1221
+ if (!NotesWindowManagerPreview_type)
1058
1222
  {
1059
1223
  return nullptr;
1060
1224
  }
1061
1225
 
1062
- if (py::register_python_type(module.get(), &type_spec_NotesWindowManagerPreviewShowNoteOptions, object_bases.get(), nullptr) == -1)
1226
+ py::pytype_handle NotesWindowManagerPreviewShowNoteOptions_type{py::register_python_type(module.get(), &type_spec_NotesWindowManagerPreviewShowNoteOptions, object_bases.get(), nullptr)};
1227
+ if (!NotesWindowManagerPreviewShowNoteOptions_type)
1063
1228
  {
1064
1229
  return nullptr;
1065
1230
  }
@@ -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.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
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.0.1
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
@@ -9,9 +9,9 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
13
- import winrt.windows.graphics.imaging
14
- import winrt.windows.storage.streams
12
+ import winrt.windows.foundation as windows_foundation
13
+ import winrt.windows.graphics.imaging as windows_graphics_imaging
14
+ import winrt.windows.storage.streams as windows_storage_streams
15
15
 
16
16
  Self = typing.TypeVar('Self')
17
17
 
@@ -39,28 +39,28 @@ class NotesWindowManagerPreview_Static(type):
39
39
  class NotesWindowManagerPreview(winrt.system.Object, metaclass=NotesWindowManagerPreview_Static):
40
40
  @staticmethod
41
41
  def _from(obj: winrt.system.Object, /) -> NotesWindowManagerPreview: ...
42
- def get_note_placement(self, note_view_id: winrt.system.Int32, /) -> typing.Optional[winrt.windows.storage.streams.IBuffer]: ...
42
+ def get_note_placement(self, note_view_id: winrt.system.Int32, /) -> typing.Optional[windows_storage_streams.IBuffer]: ...
43
43
  def hide_note(self, note_view_id: winrt.system.Int32, /) -> None: ...
44
44
  def set_focus_to_next_view(self) -> None: ...
45
45
  def set_focus_to_previous_view(self) -> None: ...
46
- def set_notes_thumbnail_async(self, thumbnail: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> winrt.windows.foundation.IAsyncAction: ...
47
- def set_thumbnail_image_for_task_switcher_async(self, bitmap: typing.Optional[winrt.windows.graphics.imaging.SoftwareBitmap], /) -> winrt.windows.foundation.IAsyncAction: ...
46
+ def set_notes_thumbnail_async(self, thumbnail: typing.Optional[windows_storage_streams.IBuffer], /) -> windows_foundation.IAsyncAction: ...
47
+ def set_thumbnail_image_for_task_switcher_async(self, bitmap: typing.Optional[windows_graphics_imaging.SoftwareBitmap], /) -> windows_foundation.IAsyncAction: ...
48
48
  def show_note(self, note_view_id: winrt.system.Int32, /) -> None: ...
49
49
  @typing.overload
50
50
  def show_note_relative_to(self, note_view_id: winrt.system.Int32, anchor_note_view_id: winrt.system.Int32, /) -> None: ...
51
51
  @typing.overload
52
52
  def show_note_relative_to(self, note_view_id: winrt.system.Int32, anchor_note_view_id: winrt.system.Int32, options: typing.Optional[NotesWindowManagerPreviewShowNoteOptions], /) -> None: ...
53
53
  @typing.overload
54
- def show_note_with_placement(self, note_view_id: winrt.system.Int32, data: typing.Optional[winrt.windows.storage.streams.IBuffer], /) -> None: ...
54
+ def show_note_with_placement(self, note_view_id: winrt.system.Int32, data: typing.Optional[windows_storage_streams.IBuffer], /) -> None: ...
55
55
  @typing.overload
56
- def show_note_with_placement(self, note_view_id: winrt.system.Int32, data: typing.Optional[winrt.windows.storage.streams.IBuffer], options: typing.Optional[NotesWindowManagerPreviewShowNoteOptions], /) -> None: ...
57
- def try_set_note_size(self, note_view_id: winrt.system.Int32, size: winrt.windows.foundation.Size, /) -> bool: ...
58
- def add_note_placement_changed(self, handler: winrt.windows.foundation.TypedEventHandler[NotesWindowManagerPreview, NotePlacementChangedPreviewEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
59
- def remove_note_placement_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
60
- def add_note_visibility_changed(self, handler: winrt.windows.foundation.TypedEventHandler[NotesWindowManagerPreview, NoteVisibilityChangedPreviewEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
61
- def remove_note_visibility_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
62
- def add_system_lock_state_changed(self, handler: winrt.windows.foundation.TypedEventHandler[NotesWindowManagerPreview, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
63
- def remove_system_lock_state_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
56
+ def show_note_with_placement(self, note_view_id: winrt.system.Int32, data: typing.Optional[windows_storage_streams.IBuffer], options: typing.Optional[NotesWindowManagerPreviewShowNoteOptions], /) -> None: ...
57
+ def try_set_note_size(self, note_view_id: winrt.system.Int32, size: windows_foundation.Size, /) -> bool: ...
58
+ def add_note_placement_changed(self, handler: windows_foundation.TypedEventHandler[NotesWindowManagerPreview, NotePlacementChangedPreviewEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
59
+ def remove_note_placement_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
60
+ def add_note_visibility_changed(self, handler: windows_foundation.TypedEventHandler[NotesWindowManagerPreview, NoteVisibilityChangedPreviewEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
61
+ def remove_note_visibility_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
62
+ def add_system_lock_state_changed(self, handler: windows_foundation.TypedEventHandler[NotesWindowManagerPreview, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
63
+ def remove_system_lock_state_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
64
64
  @_property
65
65
  def is_screen_locked(self) -> bool: ...
66
66
 
@@ -68,7 +68,7 @@ class NotesWindowManagerPreview(winrt.system.Object, metaclass=NotesWindowManage
68
68
  class NotesWindowManagerPreviewShowNoteOptions(winrt.system.Object):
69
69
  @staticmethod
70
70
  def _from(obj: winrt.system.Object, /) -> NotesWindowManagerPreviewShowNoteOptions: ...
71
- def __new__(cls: typing.Type[NotesWindowManagerPreviewShowNoteOptions]) -> NotesWindowManagerPreviewShowNoteOptions:...
71
+ def __new__(cls: typing.Type[NotesWindowManagerPreviewShowNoteOptions]) -> NotesWindowManagerPreviewShowNoteOptions: ...
72
72
  @_property
73
73
  def show_with_focus(self) -> bool: ...
74
74
  @show_with_focus.setter
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import winrt.system
4
4
  from winrt import _winrt_windows_applicationmodel_preview_notes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.ApplicationModel.Preview.Notes
3
- Version: 2.0.1
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,13 +10,13 @@ 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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Graphics.Imaging[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Graphics.Imaging[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Storage.Streams[all]==2.2.0; extra == "all"
20
20
 
21
21
  <!-- warning: Please don't edit this file. It was automatically generated. -->
22
22
 
@@ -0,0 +1,6 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
5
+ winrt-Windows.Graphics.Imaging[all]==2.2.0
6
+ winrt-Windows.Storage.Streams[all]==2.2.0
@@ -1,5 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.Foundation[all]==2.0.1
4
- winrt-Windows.Graphics.Imaging[all]==2.0.1
5
- winrt-Windows.Storage.Streams[all]==2.0.1
@@ -1,6 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1
5
- winrt-Windows.Graphics.Imaging[all]==2.0.1
6
- winrt-Windows.Storage.Streams[all]==2.0.1