winrt-Windows.ApplicationModel.Search.Core 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_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/PKG-INFO +7 -7
  2. winrt_windows_applicationmodel_search_core-2.2.0/all-requirements.txt +6 -0
  3. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/py.Windows.ApplicationModel.Search.Core.cpp +375 -203
  4. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_applicationmodel_search_core-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt/_winrt_windows_applicationmodel_search_core.pyi +16 -16
  8. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt/windows/applicationmodel/search/core/__init__.py +1 -1
  9. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt_Windows.ApplicationModel.Search.Core.egg-info/PKG-INFO +7 -7
  10. winrt_windows_applicationmodel_search_core-2.2.0/winrt_Windows.ApplicationModel.Search.Core.egg-info/requires.txt +7 -0
  11. winrt_windows_applicationmodel_search_core-2.0.1/all-requirements.txt +0 -6
  12. winrt_windows_applicationmodel_search_core-2.0.1/pywinrt-version.txt +0 -1
  13. winrt_windows_applicationmodel_search_core-2.0.1/winrt_Windows.ApplicationModel.Search.Core.egg-info/requires.txt +0 -7
  14. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/README.md +0 -0
  15. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/setup.cfg +0 -0
  16. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/setup.py +0 -0
  17. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt/windows/applicationmodel/search/core/py.typed +0 -0
  18. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt_Windows.ApplicationModel.Search.Core.egg-info/SOURCES.txt +0 -0
  19. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt_Windows.ApplicationModel.Search.Core.egg-info/dependency_links.txt +0 -0
  20. {winrt_windows_applicationmodel_search_core-2.0.1 → winrt_windows_applicationmodel_search_core-2.2.0}/winrt_Windows.ApplicationModel.Search.Core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.ApplicationModel.Search.Core
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,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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.ApplicationModel.Search[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
20
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.ApplicationModel.Search[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Storage.Streams[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.ApplicationModel.Search[all]==2.2.0
4
+ winrt-Windows.Foundation[all]==2.2.0
5
+ winrt-Windows.Foundation.Collections[all]==2.2.0
6
+ 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.Search.Core.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::ApplicationModel::Search::Core
7
6
  {
8
7
  // ----- RequestingFocusOnKeyboardInputEventArgs class --------------------
@@ -56,23 +55,20 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
56
55
  { }
57
56
  };
58
57
 
59
- static PyType_Slot _type_slots_RequestingFocusOnKeyboardInputEventArgs[] =
60
- {
58
+ static PyType_Slot _type_slots_RequestingFocusOnKeyboardInputEventArgs[] = {
61
59
  { Py_tp_new, reinterpret_cast<void*>(_new_RequestingFocusOnKeyboardInputEventArgs) },
62
60
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_RequestingFocusOnKeyboardInputEventArgs) },
63
61
  { Py_tp_methods, reinterpret_cast<void*>(_methods_RequestingFocusOnKeyboardInputEventArgs) },
64
62
  { Py_tp_getset, reinterpret_cast<void*>(_getset_RequestingFocusOnKeyboardInputEventArgs) },
65
- { },
63
+ { }
66
64
  };
67
65
 
68
- static PyType_Spec type_spec_RequestingFocusOnKeyboardInputEventArgs =
69
- {
66
+ static PyType_Spec type_spec_RequestingFocusOnKeyboardInputEventArgs = {
70
67
  "winrt._winrt_windows_applicationmodel_search_core.RequestingFocusOnKeyboardInputEventArgs",
71
68
  sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs),
72
69
  0,
73
70
  Py_TPFLAGS_DEFAULT,
74
- _type_slots_RequestingFocusOnKeyboardInputEventArgs
75
- };
71
+ _type_slots_RequestingFocusOnKeyboardInputEventArgs};
76
72
 
77
73
  // ----- SearchSuggestion class --------------------
78
74
 
@@ -93,14 +89,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
93
89
 
94
90
  static PyObject* SearchSuggestion_get_DetailText(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
95
91
  {
96
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"DetailText"))
97
- {
98
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
99
- return nullptr;
100
- }
101
-
102
92
  try
103
93
  {
94
+ static std::optional<bool> is_property_present{};
95
+
96
+ if (!is_property_present.has_value())
97
+ {
98
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"DetailText");
99
+ }
100
+
101
+ if (!is_property_present.value())
102
+ {
103
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
104
+ return nullptr;
105
+ }
106
+
104
107
  return py::convert(self->obj.DetailText());
105
108
  }
106
109
  catch (...)
@@ -112,14 +115,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
112
115
 
113
116
  static PyObject* SearchSuggestion_get_Image(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
114
117
  {
115
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Image"))
116
- {
117
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
118
- return nullptr;
119
- }
120
-
121
118
  try
122
119
  {
120
+ static std::optional<bool> is_property_present{};
121
+
122
+ if (!is_property_present.has_value())
123
+ {
124
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Image");
125
+ }
126
+
127
+ if (!is_property_present.value())
128
+ {
129
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
130
+ return nullptr;
131
+ }
132
+
123
133
  return py::convert(self->obj.Image());
124
134
  }
125
135
  catch (...)
@@ -131,14 +141,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
131
141
 
132
142
  static PyObject* SearchSuggestion_get_ImageAlternateText(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
133
143
  {
134
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"ImageAlternateText"))
135
- {
136
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
137
- return nullptr;
138
- }
139
-
140
144
  try
141
145
  {
146
+ static std::optional<bool> is_property_present{};
147
+
148
+ if (!is_property_present.has_value())
149
+ {
150
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"ImageAlternateText");
151
+ }
152
+
153
+ if (!is_property_present.value())
154
+ {
155
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
156
+ return nullptr;
157
+ }
158
+
142
159
  return py::convert(self->obj.ImageAlternateText());
143
160
  }
144
161
  catch (...)
@@ -150,14 +167,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
150
167
 
151
168
  static PyObject* SearchSuggestion_get_Kind(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
152
169
  {
153
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Kind"))
154
- {
155
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
156
- return nullptr;
157
- }
158
-
159
170
  try
160
171
  {
172
+ static std::optional<bool> is_property_present{};
173
+
174
+ if (!is_property_present.has_value())
175
+ {
176
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Kind");
177
+ }
178
+
179
+ if (!is_property_present.value())
180
+ {
181
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
182
+ return nullptr;
183
+ }
184
+
161
185
  return py::convert(self->obj.Kind());
162
186
  }
163
187
  catch (...)
@@ -169,14 +193,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
169
193
 
170
194
  static PyObject* SearchSuggestion_get_Tag(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
171
195
  {
172
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Tag"))
173
- {
174
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
175
- return nullptr;
176
- }
177
-
178
196
  try
179
197
  {
198
+ static std::optional<bool> is_property_present{};
199
+
200
+ if (!is_property_present.has_value())
201
+ {
202
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Tag");
203
+ }
204
+
205
+ if (!is_property_present.value())
206
+ {
207
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
208
+ return nullptr;
209
+ }
210
+
180
211
  return py::convert(self->obj.Tag());
181
212
  }
182
213
  catch (...)
@@ -188,14 +219,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
188
219
 
189
220
  static PyObject* SearchSuggestion_get_Text(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
190
221
  {
191
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Text"))
192
- {
193
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
194
- return nullptr;
195
- }
196
-
197
222
  try
198
223
  {
224
+ static std::optional<bool> is_property_present{};
225
+
226
+ if (!is_property_present.has_value())
227
+ {
228
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestion", L"Text");
229
+ }
230
+
231
+ if (!is_property_present.value())
232
+ {
233
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
234
+ return nullptr;
235
+ }
236
+
199
237
  return py::convert(self->obj.Text());
200
238
  }
201
239
  catch (...)
@@ -245,23 +283,20 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
245
283
  { }
246
284
  };
247
285
 
248
- static PyType_Slot _type_slots_SearchSuggestion[] =
249
- {
286
+ static PyType_Slot _type_slots_SearchSuggestion[] = {
250
287
  { Py_tp_new, reinterpret_cast<void*>(_new_SearchSuggestion) },
251
288
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SearchSuggestion) },
252
289
  { Py_tp_methods, reinterpret_cast<void*>(_methods_SearchSuggestion) },
253
290
  { Py_tp_getset, reinterpret_cast<void*>(_getset_SearchSuggestion) },
254
- { },
291
+ { }
255
292
  };
256
293
 
257
- static PyType_Spec type_spec_SearchSuggestion =
258
- {
294
+ static PyType_Spec type_spec_SearchSuggestion = {
259
295
  "winrt._winrt_windows_applicationmodel_search_core.SearchSuggestion",
260
296
  sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion),
261
297
  0,
262
298
  Py_TPFLAGS_DEFAULT,
263
- _type_slots_SearchSuggestion
264
- };
299
+ _type_slots_SearchSuggestion};
265
300
 
266
301
  // ----- SearchSuggestionManager class --------------------
267
302
 
@@ -278,7 +313,7 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
278
313
  {
279
314
  try
280
315
  {
281
- winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager instance{ };
316
+ winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager instance{};
282
317
  return py::wrap(instance, type);
283
318
  }
284
319
  catch (...)
@@ -308,14 +343,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
308
343
 
309
344
  if (arg_count == 1)
310
345
  {
311
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"AddToHistory", 1))
312
- {
313
- py::set_arg_count_version_error(1);
314
- return nullptr;
315
- }
316
-
317
346
  try
318
347
  {
348
+ static std::optional<bool> is_overload_present{};
349
+
350
+ if (!is_overload_present.has_value())
351
+ {
352
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"AddToHistory", 1);
353
+ }
354
+
355
+ if (!is_overload_present.value())
356
+ {
357
+ py::set_arg_count_version_error(1);
358
+ return nullptr;
359
+ }
360
+
319
361
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
320
362
 
321
363
  self->obj.AddToHistory(param0);
@@ -329,14 +371,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
329
371
  }
330
372
  else if (arg_count == 2)
331
373
  {
332
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"AddToHistory", 2))
333
- {
334
- py::set_arg_count_version_error(2);
335
- return nullptr;
336
- }
337
-
338
374
  try
339
375
  {
376
+ static std::optional<bool> is_overload_present{};
377
+
378
+ if (!is_overload_present.has_value())
379
+ {
380
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"AddToHistory", 2);
381
+ }
382
+
383
+ if (!is_overload_present.value())
384
+ {
385
+ py::set_arg_count_version_error(2);
386
+ return nullptr;
387
+ }
388
+
340
389
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
341
390
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
342
391
 
@@ -362,14 +411,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
362
411
 
363
412
  if (arg_count == 0)
364
413
  {
365
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"ClearHistory", 0))
366
- {
367
- py::set_arg_count_version_error(0);
368
- return nullptr;
369
- }
370
-
371
414
  try
372
415
  {
416
+ static std::optional<bool> is_overload_present{};
417
+
418
+ if (!is_overload_present.has_value())
419
+ {
420
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"ClearHistory", 0);
421
+ }
422
+
423
+ if (!is_overload_present.value())
424
+ {
425
+ py::set_arg_count_version_error(0);
426
+ return nullptr;
427
+ }
428
+
373
429
  self->obj.ClearHistory();
374
430
  Py_RETURN_NONE;
375
431
  }
@@ -392,14 +448,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
392
448
 
393
449
  if (arg_count == 1)
394
450
  {
395
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetLocalContentSuggestionSettings", 1))
396
- {
397
- py::set_arg_count_version_error(1);
398
- return nullptr;
399
- }
400
-
401
451
  try
402
452
  {
453
+ static std::optional<bool> is_overload_present{};
454
+
455
+ if (!is_overload_present.has_value())
456
+ {
457
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetLocalContentSuggestionSettings", 1);
458
+ }
459
+
460
+ if (!is_overload_present.value())
461
+ {
462
+ py::set_arg_count_version_error(1);
463
+ return nullptr;
464
+ }
465
+
403
466
  auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Search::LocalContentSuggestionSettings>(args, 0);
404
467
 
405
468
  self->obj.SetLocalContentSuggestionSettings(param0);
@@ -424,14 +487,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
424
487
 
425
488
  if (arg_count == 1)
426
489
  {
427
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetQuery", 1))
428
- {
429
- py::set_arg_count_version_error(1);
430
- return nullptr;
431
- }
432
-
433
490
  try
434
491
  {
492
+ static std::optional<bool> is_overload_present{};
493
+
494
+ if (!is_overload_present.has_value())
495
+ {
496
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetQuery", 1);
497
+ }
498
+
499
+ if (!is_overload_present.value())
500
+ {
501
+ py::set_arg_count_version_error(1);
502
+ return nullptr;
503
+ }
504
+
435
505
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
436
506
 
437
507
  self->obj.SetQuery(param0);
@@ -445,14 +515,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
445
515
  }
446
516
  else if (arg_count == 2)
447
517
  {
448
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetQuery", 2))
449
- {
450
- py::set_arg_count_version_error(2);
451
- return nullptr;
452
- }
453
-
454
518
  try
455
519
  {
520
+ static std::optional<bool> is_overload_present{};
521
+
522
+ if (!is_overload_present.has_value())
523
+ {
524
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetQuery", 2);
525
+ }
526
+
527
+ if (!is_overload_present.value())
528
+ {
529
+ py::set_arg_count_version_error(2);
530
+ return nullptr;
531
+ }
532
+
456
533
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
457
534
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
458
535
 
@@ -467,14 +544,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
467
544
  }
468
545
  else if (arg_count == 3)
469
546
  {
470
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetQuery", 3))
471
- {
472
- py::set_arg_count_version_error(3);
473
- return nullptr;
474
- }
475
-
476
547
  try
477
548
  {
549
+ static std::optional<bool> is_overload_present{};
550
+
551
+ if (!is_overload_present.has_value())
552
+ {
553
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SetQuery", 3);
554
+ }
555
+
556
+ if (!is_overload_present.value())
557
+ {
558
+ py::set_arg_count_version_error(3);
559
+ return nullptr;
560
+ }
561
+
478
562
  auto param0 = py::convert_to<winrt::hstring>(args, 0);
479
563
  auto param1 = py::convert_to<winrt::hstring>(args, 1);
480
564
  auto param2 = py::convert_to<winrt::Windows::ApplicationModel::Search::SearchQueryLinguisticDetails>(args, 2);
@@ -497,14 +581,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
497
581
 
498
582
  static PyObject* SearchSuggestionManager_get_SearchHistoryEnabled(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, void* /*unused*/) noexcept
499
583
  {
500
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryEnabled"))
501
- {
502
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
503
- return nullptr;
504
- }
505
-
506
584
  try
507
585
  {
586
+ static std::optional<bool> is_property_present{};
587
+
588
+ if (!is_property_present.has_value())
589
+ {
590
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryEnabled");
591
+ }
592
+
593
+ if (!is_property_present.value())
594
+ {
595
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
596
+ return nullptr;
597
+ }
598
+
508
599
  return py::convert(self->obj.SearchHistoryEnabled());
509
600
  }
510
601
  catch (...)
@@ -516,12 +607,6 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
516
607
 
517
608
  static int SearchSuggestionManager_put_SearchHistoryEnabled(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg, void* /*unused*/) noexcept
518
609
  {
519
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryEnabled"))
520
- {
521
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
522
- return -1;
523
- }
524
-
525
610
  if (arg == nullptr)
526
611
  {
527
612
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -530,6 +615,19 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
530
615
 
531
616
  try
532
617
  {
618
+ static std::optional<bool> is_property_present{};
619
+
620
+ if (!is_property_present.has_value())
621
+ {
622
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryEnabled");
623
+ }
624
+
625
+ if (!is_property_present.value())
626
+ {
627
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
628
+ return -1;
629
+ }
630
+
533
631
  auto param0 = py::convert_to<bool>(arg);
534
632
 
535
633
  self->obj.SearchHistoryEnabled(param0);
@@ -544,14 +642,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
544
642
 
545
643
  static PyObject* SearchSuggestionManager_get_SearchHistoryContext(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, void* /*unused*/) noexcept
546
644
  {
547
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryContext"))
548
- {
549
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
550
- return nullptr;
551
- }
552
-
553
645
  try
554
646
  {
647
+ static std::optional<bool> is_property_present{};
648
+
649
+ if (!is_property_present.has_value())
650
+ {
651
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryContext");
652
+ }
653
+
654
+ if (!is_property_present.value())
655
+ {
656
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
657
+ return nullptr;
658
+ }
659
+
555
660
  return py::convert(self->obj.SearchHistoryContext());
556
661
  }
557
662
  catch (...)
@@ -563,12 +668,6 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
563
668
 
564
669
  static int SearchSuggestionManager_put_SearchHistoryContext(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg, void* /*unused*/) noexcept
565
670
  {
566
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryContext"))
567
- {
568
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
569
- return -1;
570
- }
571
-
572
671
  if (arg == nullptr)
573
672
  {
574
673
  PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
@@ -577,6 +676,19 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
577
676
 
578
677
  try
579
678
  {
679
+ static std::optional<bool> is_property_present{};
680
+
681
+ if (!is_property_present.has_value())
682
+ {
683
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SearchHistoryContext");
684
+ }
685
+
686
+ if (!is_property_present.value())
687
+ {
688
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
689
+ return -1;
690
+ }
691
+
580
692
  auto param0 = py::convert_to<winrt::hstring>(arg);
581
693
 
582
694
  self->obj.SearchHistoryContext(param0);
@@ -591,14 +703,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
591
703
 
592
704
  static PyObject* SearchSuggestionManager_get_Suggestions(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, void* /*unused*/) noexcept
593
705
  {
594
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"Suggestions"))
595
- {
596
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
597
- return nullptr;
598
- }
599
-
600
706
  try
601
707
  {
708
+ static std::optional<bool> is_property_present{};
709
+
710
+ if (!is_property_present.has_value())
711
+ {
712
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"Suggestions");
713
+ }
714
+
715
+ if (!is_property_present.value())
716
+ {
717
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
718
+ return nullptr;
719
+ }
720
+
602
721
  return py::convert(self->obj.Suggestions());
603
722
  }
604
723
  catch (...)
@@ -610,14 +729,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
610
729
 
611
730
  static PyObject* SearchSuggestionManager_add_RequestingFocusOnKeyboardInput(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
612
731
  {
613
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"RequestingFocusOnKeyboardInput"))
614
- {
615
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
616
- return nullptr;
617
- }
618
-
619
732
  try
620
733
  {
734
+ static std::optional<bool> is_event_present{};
735
+
736
+ if (!is_event_present.has_value())
737
+ {
738
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"RequestingFocusOnKeyboardInput");
739
+ }
740
+
741
+ if (!is_event_present.value())
742
+ {
743
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
744
+ return nullptr;
745
+ }
746
+
621
747
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager, winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs>>(arg);
622
748
 
623
749
  return py::convert(self->obj.RequestingFocusOnKeyboardInput(param0));
@@ -631,14 +757,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
631
757
 
632
758
  static PyObject* SearchSuggestionManager_remove_RequestingFocusOnKeyboardInput(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
633
759
  {
634
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"RequestingFocusOnKeyboardInput"))
635
- {
636
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
637
- return nullptr;
638
- }
639
-
640
760
  try
641
761
  {
762
+ static std::optional<bool> is_event_present{};
763
+
764
+ if (!is_event_present.has_value())
765
+ {
766
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"RequestingFocusOnKeyboardInput");
767
+ }
768
+
769
+ if (!is_event_present.value())
770
+ {
771
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
772
+ return nullptr;
773
+ }
774
+
642
775
  auto param0 = py::convert_to<winrt::event_token>(arg);
643
776
 
644
777
  self->obj.RequestingFocusOnKeyboardInput(param0);
@@ -653,14 +786,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
653
786
 
654
787
  static PyObject* SearchSuggestionManager_add_SuggestionsRequested(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
655
788
  {
656
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SuggestionsRequested"))
657
- {
658
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
659
- return nullptr;
660
- }
661
-
662
789
  try
663
790
  {
791
+ static std::optional<bool> is_event_present{};
792
+
793
+ if (!is_event_present.has_value())
794
+ {
795
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SuggestionsRequested");
796
+ }
797
+
798
+ if (!is_event_present.value())
799
+ {
800
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
801
+ return nullptr;
802
+ }
803
+
664
804
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager, winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs>>(arg);
665
805
 
666
806
  return py::convert(self->obj.SuggestionsRequested(param0));
@@ -674,14 +814,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
674
814
 
675
815
  static PyObject* SearchSuggestionManager_remove_SuggestionsRequested(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
676
816
  {
677
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SuggestionsRequested"))
678
- {
679
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
680
- return nullptr;
681
- }
682
-
683
817
  try
684
818
  {
819
+ static std::optional<bool> is_event_present{};
820
+
821
+ if (!is_event_present.has_value())
822
+ {
823
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionManager", L"SuggestionsRequested");
824
+ }
825
+
826
+ if (!is_event_present.value())
827
+ {
828
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
829
+ return nullptr;
830
+ }
831
+
685
832
  auto param0 = py::convert_to<winrt::event_token>(arg);
686
833
 
687
834
  self->obj.SuggestionsRequested(param0);
@@ -739,23 +886,20 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
739
886
  { }
740
887
  };
741
888
 
742
- static PyType_Slot _type_slots_SearchSuggestionManager[] =
743
- {
889
+ static PyType_Slot _type_slots_SearchSuggestionManager[] = {
744
890
  { Py_tp_new, reinterpret_cast<void*>(_new_SearchSuggestionManager) },
745
891
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SearchSuggestionManager) },
746
892
  { Py_tp_methods, reinterpret_cast<void*>(_methods_SearchSuggestionManager) },
747
893
  { Py_tp_getset, reinterpret_cast<void*>(_getset_SearchSuggestionManager) },
748
- { },
894
+ { }
749
895
  };
750
896
 
751
- static PyType_Spec type_spec_SearchSuggestionManager =
752
- {
897
+ static PyType_Spec type_spec_SearchSuggestionManager = {
753
898
  "winrt._winrt_windows_applicationmodel_search_core.SearchSuggestionManager",
754
899
  sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager),
755
900
  0,
756
901
  Py_TPFLAGS_DEFAULT,
757
- _type_slots_SearchSuggestionManager
758
- };
902
+ _type_slots_SearchSuggestionManager};
759
903
 
760
904
  // ----- SearchSuggestionsRequestedEventArgs class --------------------
761
905
 
@@ -776,14 +920,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
776
920
 
777
921
  static PyObject* SearchSuggestionsRequestedEventArgs_get_Language(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
778
922
  {
779
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"Language"))
780
- {
781
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
782
- return nullptr;
783
- }
784
-
785
923
  try
786
924
  {
925
+ static std::optional<bool> is_property_present{};
926
+
927
+ if (!is_property_present.has_value())
928
+ {
929
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"Language");
930
+ }
931
+
932
+ if (!is_property_present.value())
933
+ {
934
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
935
+ return nullptr;
936
+ }
937
+
787
938
  return py::convert(self->obj.Language());
788
939
  }
789
940
  catch (...)
@@ -795,14 +946,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
795
946
 
796
947
  static PyObject* SearchSuggestionsRequestedEventArgs_get_LinguisticDetails(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
797
948
  {
798
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"LinguisticDetails"))
799
- {
800
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
801
- return nullptr;
802
- }
803
-
804
949
  try
805
950
  {
951
+ static std::optional<bool> is_property_present{};
952
+
953
+ if (!is_property_present.has_value())
954
+ {
955
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"LinguisticDetails");
956
+ }
957
+
958
+ if (!is_property_present.value())
959
+ {
960
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
961
+ return nullptr;
962
+ }
963
+
806
964
  return py::convert(self->obj.LinguisticDetails());
807
965
  }
808
966
  catch (...)
@@ -814,14 +972,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
814
972
 
815
973
  static PyObject* SearchSuggestionsRequestedEventArgs_get_QueryText(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
816
974
  {
817
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"QueryText"))
818
- {
819
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
820
- return nullptr;
821
- }
822
-
823
975
  try
824
976
  {
977
+ static std::optional<bool> is_property_present{};
978
+
979
+ if (!is_property_present.has_value())
980
+ {
981
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"QueryText");
982
+ }
983
+
984
+ if (!is_property_present.value())
985
+ {
986
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
987
+ return nullptr;
988
+ }
989
+
825
990
  return py::convert(self->obj.QueryText());
826
991
  }
827
992
  catch (...)
@@ -833,14 +998,21 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
833
998
 
834
999
  static PyObject* SearchSuggestionsRequestedEventArgs_get_Request(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
835
1000
  {
836
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"Request"))
837
- {
838
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
839
- return nullptr;
840
- }
841
-
842
1001
  try
843
1002
  {
1003
+ static std::optional<bool> is_property_present{};
1004
+
1005
+ if (!is_property_present.has_value())
1006
+ {
1007
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Search.Core.SearchSuggestionsRequestedEventArgs", L"Request");
1008
+ }
1009
+
1010
+ if (!is_property_present.value())
1011
+ {
1012
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
1013
+ return nullptr;
1014
+ }
1015
+
844
1016
  return py::convert(self->obj.Request());
845
1017
  }
846
1018
  catch (...)
@@ -888,39 +1060,35 @@ namespace py::cpp::Windows::ApplicationModel::Search::Core
888
1060
  { }
889
1061
  };
890
1062
 
891
- static PyType_Slot _type_slots_SearchSuggestionsRequestedEventArgs[] =
892
- {
1063
+ static PyType_Slot _type_slots_SearchSuggestionsRequestedEventArgs[] = {
893
1064
  { Py_tp_new, reinterpret_cast<void*>(_new_SearchSuggestionsRequestedEventArgs) },
894
1065
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SearchSuggestionsRequestedEventArgs) },
895
1066
  { Py_tp_methods, reinterpret_cast<void*>(_methods_SearchSuggestionsRequestedEventArgs) },
896
1067
  { Py_tp_getset, reinterpret_cast<void*>(_getset_SearchSuggestionsRequestedEventArgs) },
897
- { },
1068
+ { }
898
1069
  };
899
1070
 
900
- static PyType_Spec type_spec_SearchSuggestionsRequestedEventArgs =
901
- {
1071
+ static PyType_Spec type_spec_SearchSuggestionsRequestedEventArgs = {
902
1072
  "winrt._winrt_windows_applicationmodel_search_core.SearchSuggestionsRequestedEventArgs",
903
1073
  sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs),
904
1074
  0,
905
1075
  Py_TPFLAGS_DEFAULT,
906
- _type_slots_SearchSuggestionsRequestedEventArgs
907
- };
1076
+ _type_slots_SearchSuggestionsRequestedEventArgs};
908
1077
 
909
1078
  // ----- Windows.ApplicationModel.Search.Core Initialization --------------------
910
- PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Search::Core");
911
1079
 
1080
+ PyDoc_STRVAR(module_doc, "Windows.ApplicationModel.Search.Core");
912
1081
 
913
- static PyModuleDef module_def
914
- = {PyModuleDef_HEAD_INIT,
915
- "_winrt_windows_applicationmodel_search_core",
916
- module_doc,
917
- 0,
918
- nullptr,
919
- nullptr,
920
- nullptr,
921
- nullptr,
922
- nullptr};
923
-
1082
+ static PyModuleDef module_def = {
1083
+ PyModuleDef_HEAD_INIT,
1084
+ "_winrt_windows_applicationmodel_search_core",
1085
+ module_doc,
1086
+ 0,
1087
+ nullptr,
1088
+ nullptr,
1089
+ nullptr,
1090
+ nullptr,
1091
+ nullptr};
924
1092
  } // py::cpp::Windows::ApplicationModel::Search::Core
925
1093
 
926
1094
  PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_search_core(void) noexcept
@@ -952,22 +1120,26 @@ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_search_core(void) noexcept
952
1120
  return nullptr;
953
1121
  }
954
1122
 
955
- if (py::register_python_type(module.get(), &type_spec_RequestingFocusOnKeyboardInputEventArgs, object_bases.get(), nullptr) == -1)
1123
+ py::pytype_handle RequestingFocusOnKeyboardInputEventArgs_type{py::register_python_type(module.get(), &type_spec_RequestingFocusOnKeyboardInputEventArgs, object_bases.get(), nullptr)};
1124
+ if (!RequestingFocusOnKeyboardInputEventArgs_type)
956
1125
  {
957
1126
  return nullptr;
958
1127
  }
959
1128
 
960
- if (py::register_python_type(module.get(), &type_spec_SearchSuggestion, object_bases.get(), nullptr) == -1)
1129
+ py::pytype_handle SearchSuggestion_type{py::register_python_type(module.get(), &type_spec_SearchSuggestion, object_bases.get(), nullptr)};
1130
+ if (!SearchSuggestion_type)
961
1131
  {
962
1132
  return nullptr;
963
1133
  }
964
1134
 
965
- if (py::register_python_type(module.get(), &type_spec_SearchSuggestionManager, object_bases.get(), nullptr) == -1)
1135
+ py::pytype_handle SearchSuggestionManager_type{py::register_python_type(module.get(), &type_spec_SearchSuggestionManager, object_bases.get(), nullptr)};
1136
+ if (!SearchSuggestionManager_type)
966
1137
  {
967
1138
  return nullptr;
968
1139
  }
969
1140
 
970
- if (py::register_python_type(module.get(), &type_spec_SearchSuggestionsRequestedEventArgs, object_bases.get(), nullptr) == -1)
1141
+ py::pytype_handle SearchSuggestionsRequestedEventArgs_type{py::register_python_type(module.get(), &type_spec_SearchSuggestionsRequestedEventArgs, object_bases.get(), nullptr)};
1142
+ if (!SearchSuggestionsRequestedEventArgs_type)
971
1143
  {
972
1144
  return nullptr;
973
1145
  }
@@ -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,10 +9,10 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.applicationmodel.search
13
- import winrt.windows.foundation
14
- import winrt.windows.foundation.collections
15
- import winrt.windows.storage.streams
12
+ import winrt.windows.applicationmodel.search as windows_applicationmodel_search
13
+ import winrt.windows.foundation as windows_foundation
14
+ import winrt.windows.foundation.collections as windows_foundation_collections
15
+ import winrt.windows.storage.streams as windows_storage_streams
16
16
 
17
17
  from winrt.windows.applicationmodel.search.core import SearchSuggestionKind
18
18
 
@@ -30,7 +30,7 @@ class SearchSuggestion(winrt.system.Object):
30
30
  @_property
31
31
  def detail_text(self) -> str: ...
32
32
  @_property
33
- def image(self) -> typing.Optional[winrt.windows.storage.streams.IRandomAccessStreamReference]: ...
33
+ def image(self) -> typing.Optional[windows_storage_streams.IRandomAccessStreamReference]: ...
34
34
  @_property
35
35
  def image_alternate_text(self) -> str: ...
36
36
  @_property
@@ -44,23 +44,23 @@ class SearchSuggestion(winrt.system.Object):
44
44
  class SearchSuggestionManager(winrt.system.Object):
45
45
  @staticmethod
46
46
  def _from(obj: winrt.system.Object, /) -> SearchSuggestionManager: ...
47
- def __new__(cls: typing.Type[SearchSuggestionManager]) -> SearchSuggestionManager:...
47
+ def __new__(cls: typing.Type[SearchSuggestionManager]) -> SearchSuggestionManager: ...
48
48
  @typing.overload
49
49
  def add_to_history(self, query_text: str, /) -> None: ...
50
50
  @typing.overload
51
51
  def add_to_history(self, query_text: str, language: str, /) -> None: ...
52
52
  def clear_history(self) -> None: ...
53
- def set_local_content_suggestion_settings(self, settings: typing.Optional[winrt.windows.applicationmodel.search.LocalContentSuggestionSettings], /) -> None: ...
53
+ def set_local_content_suggestion_settings(self, settings: typing.Optional[windows_applicationmodel_search.LocalContentSuggestionSettings], /) -> None: ...
54
54
  @typing.overload
55
55
  def set_query(self, query_text: str, /) -> None: ...
56
56
  @typing.overload
57
57
  def set_query(self, query_text: str, language: str, /) -> None: ...
58
58
  @typing.overload
59
- def set_query(self, query_text: str, language: str, linguistic_details: typing.Optional[winrt.windows.applicationmodel.search.SearchQueryLinguisticDetails], /) -> None: ...
60
- def add_requesting_focus_on_keyboard_input(self, handler: winrt.windows.foundation.TypedEventHandler[SearchSuggestionManager, RequestingFocusOnKeyboardInputEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
61
- def remove_requesting_focus_on_keyboard_input(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
62
- def add_suggestions_requested(self, handler: winrt.windows.foundation.TypedEventHandler[SearchSuggestionManager, SearchSuggestionsRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
63
- def remove_suggestions_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
59
+ def set_query(self, query_text: str, language: str, linguistic_details: typing.Optional[windows_applicationmodel_search.SearchQueryLinguisticDetails], /) -> None: ...
60
+ def add_requesting_focus_on_keyboard_input(self, handler: windows_foundation.TypedEventHandler[SearchSuggestionManager, RequestingFocusOnKeyboardInputEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
61
+ def remove_requesting_focus_on_keyboard_input(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
62
+ def add_suggestions_requested(self, handler: windows_foundation.TypedEventHandler[SearchSuggestionManager, SearchSuggestionsRequestedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
63
+ def remove_suggestions_requested(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
64
64
  @_property
65
65
  def search_history_enabled(self) -> bool: ...
66
66
  @search_history_enabled.setter
@@ -70,7 +70,7 @@ class SearchSuggestionManager(winrt.system.Object):
70
70
  @search_history_context.setter
71
71
  def search_history_context(self, value: str) -> None: ...
72
72
  @_property
73
- def suggestions(self) -> typing.Optional[winrt.windows.foundation.collections.IObservableVector[SearchSuggestion]]: ...
73
+ def suggestions(self) -> typing.Optional[windows_foundation_collections.IObservableVector[SearchSuggestion]]: ...
74
74
 
75
75
  @typing.final
76
76
  class SearchSuggestionsRequestedEventArgs(winrt.system.Object):
@@ -79,9 +79,9 @@ class SearchSuggestionsRequestedEventArgs(winrt.system.Object):
79
79
  @_property
80
80
  def language(self) -> str: ...
81
81
  @_property
82
- def linguistic_details(self) -> typing.Optional[winrt.windows.applicationmodel.search.SearchQueryLinguisticDetails]: ...
82
+ def linguistic_details(self) -> typing.Optional[windows_applicationmodel_search.SearchQueryLinguisticDetails]: ...
83
83
  @_property
84
84
  def query_text(self) -> str: ...
85
85
  @_property
86
- def request(self) -> typing.Optional[winrt.windows.applicationmodel.search.SearchSuggestionsRequest]: ...
86
+ def request(self) -> typing.Optional[windows_applicationmodel_search.SearchSuggestionsRequest]: ...
87
87
 
@@ -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 enum
4
4
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.ApplicationModel.Search.Core
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,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.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.ApplicationModel.Search[all]==2.0.1; extra == "all"
18
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
19
- Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.0.1; extra == "all"
20
- Requires-Dist: winrt-Windows.Storage.Streams[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.ApplicationModel.Search[all]==2.2.0; extra == "all"
18
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
19
+ Requires-Dist: winrt-Windows.Foundation.Collections[all]==2.2.0; extra == "all"
20
+ Requires-Dist: winrt-Windows.Storage.Streams[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.ApplicationModel.Search[all]==2.2.0
5
+ winrt-Windows.Foundation[all]==2.2.0
6
+ winrt-Windows.Foundation.Collections[all]==2.2.0
7
+ winrt-Windows.Storage.Streams[all]==2.2.0
@@ -1,6 +0,0 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
2
-
3
- winrt-Windows.ApplicationModel.Search[all]==2.0.1
4
- winrt-Windows.Foundation[all]==2.0.1
5
- winrt-Windows.Foundation.Collections[all]==2.0.1
6
- winrt-Windows.Storage.Streams[all]==2.0.1
@@ -1,7 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.ApplicationModel.Search[all]==2.0.1
5
- winrt-Windows.Foundation[all]==2.0.1
6
- winrt-Windows.Foundation.Collections[all]==2.0.1
7
- winrt-Windows.Storage.Streams[all]==2.0.1