winrt-Windows.ApplicationModel.Search.Core 2.0.0b1__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 (16) hide show
  1. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/PKG-INFO +22 -0
  2. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/README.md +7 -0
  3. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/all-requirements.txt +6 -0
  4. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/py.Windows.ApplicationModel.Search.Core.cpp +977 -0
  5. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/pyproject.toml +43 -0
  6. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/pywinrt-version.txt +1 -0
  7. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/requirements.txt +3 -0
  8. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/setup.cfg +4 -0
  9. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/setup.py +17 -0
  10. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt/_winrt_windows_applicationmodel_search_core.pyi +83 -0
  11. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt/windows/applicationmodel/search/core/__init__.py +24 -0
  12. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt_Windows.ApplicationModel.Search.Core.egg-info/PKG-INFO +22 -0
  13. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt_Windows.ApplicationModel.Search.Core.egg-info/SOURCES.txt +14 -0
  14. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt_Windows.ApplicationModel.Search.Core.egg-info/dependency_links.txt +1 -0
  15. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt_Windows.ApplicationModel.Search.Core.egg-info/requires.txt +7 -0
  16. winrt-Windows.ApplicationModel.Search.Core-2.0.0b1/winrt_Windows.ApplicationModel.Search.Core.egg-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.ApplicationModel.Search.Core
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.ApplicationModel.Search.Core
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Search.Core` namespace.
21
+
22
+ This package provides the `winrt.windows.applicationmodel.search.core` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.ApplicationModel.Search.Core
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Search.Core` namespace.
6
+
7
+ This package provides the `winrt.windows.applicationmodel.search.core` module.
@@ -0,0 +1,6 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-Windows.ApplicationModel.Search[all]==2.0.0-beta.1
4
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
5
+ winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
6
+ winrt-Windows.Storage.Streams[all]==2.0.0-beta.1
@@ -0,0 +1,977 @@
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ #include "py.Windows.ApplicationModel.Search.Core.h"
4
+
5
+
6
+ namespace py::cpp::Windows::ApplicationModel::Search::Core
7
+ {
8
+ // ----- RequestingFocusOnKeyboardInputEventArgs class --------------------
9
+
10
+ static PyObject* _new_RequestingFocusOnKeyboardInputEventArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
11
+ {
12
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs>::type_name);
13
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs>::type_name);
14
+ return nullptr;
15
+ }
16
+
17
+ static void _dealloc_RequestingFocusOnKeyboardInputEventArgs(py::wrapper::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs* self) noexcept
18
+ {
19
+ auto tp = Py_TYPE(self);
20
+ std::destroy_at(&self->obj);
21
+ tp->tp_free(self);
22
+ Py_DECREF(tp);
23
+ }
24
+
25
+ static PyObject* _assign_array_RequestingFocusOnKeyboardInputEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
26
+ {
27
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs>>();
28
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
29
+ {
30
+ return nullptr;
31
+ }
32
+ Py_RETURN_NONE;
33
+ }
34
+
35
+ static PyObject* _from_RequestingFocusOnKeyboardInputEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
36
+ {
37
+ try
38
+ {
39
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
40
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs>());
41
+ }
42
+ catch (...)
43
+ {
44
+ py::to_PyErr();
45
+ return nullptr;
46
+ }
47
+ }
48
+
49
+ static PyMethodDef _methods_RequestingFocusOnKeyboardInputEventArgs[] = {
50
+ { "_assign_array_", _assign_array_RequestingFocusOnKeyboardInputEventArgs, METH_O | METH_STATIC, nullptr },
51
+ { "_from", reinterpret_cast<PyCFunction>(_from_RequestingFocusOnKeyboardInputEventArgs), METH_O | METH_STATIC, nullptr },
52
+ { }
53
+ };
54
+
55
+ static PyGetSetDef _getset_RequestingFocusOnKeyboardInputEventArgs[] = {
56
+ { }
57
+ };
58
+
59
+ static PyType_Slot _type_slots_RequestingFocusOnKeyboardInputEventArgs[] =
60
+ {
61
+ { Py_tp_new, reinterpret_cast<void*>(_new_RequestingFocusOnKeyboardInputEventArgs) },
62
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_RequestingFocusOnKeyboardInputEventArgs) },
63
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_RequestingFocusOnKeyboardInputEventArgs) },
64
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_RequestingFocusOnKeyboardInputEventArgs) },
65
+ { },
66
+ };
67
+
68
+ static PyType_Spec type_spec_RequestingFocusOnKeyboardInputEventArgs =
69
+ {
70
+ "winrt._winrt_windows_applicationmodel_search_core.RequestingFocusOnKeyboardInputEventArgs",
71
+ sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs),
72
+ 0,
73
+ Py_TPFLAGS_DEFAULT,
74
+ _type_slots_RequestingFocusOnKeyboardInputEventArgs
75
+ };
76
+
77
+ // ----- SearchSuggestion class --------------------
78
+
79
+ static PyObject* _new_SearchSuggestion(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
80
+ {
81
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestion>::type_name);
82
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestion>::type_name);
83
+ return nullptr;
84
+ }
85
+
86
+ static void _dealloc_SearchSuggestion(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self) noexcept
87
+ {
88
+ auto tp = Py_TYPE(self);
89
+ std::destroy_at(&self->obj);
90
+ tp->tp_free(self);
91
+ Py_DECREF(tp);
92
+ }
93
+
94
+ static PyObject* SearchSuggestion_get_DetailText(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
95
+ {
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
+ try
103
+ {
104
+ return py::convert(self->obj.DetailText());
105
+ }
106
+ catch (...)
107
+ {
108
+ py::to_PyErr();
109
+ return nullptr;
110
+ }
111
+ }
112
+
113
+ static PyObject* SearchSuggestion_get_Image(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
114
+ {
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
+ try
122
+ {
123
+ return py::convert(self->obj.Image());
124
+ }
125
+ catch (...)
126
+ {
127
+ py::to_PyErr();
128
+ return nullptr;
129
+ }
130
+ }
131
+
132
+ static PyObject* SearchSuggestion_get_ImageAlternateText(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
133
+ {
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
+ try
141
+ {
142
+ return py::convert(self->obj.ImageAlternateText());
143
+ }
144
+ catch (...)
145
+ {
146
+ py::to_PyErr();
147
+ return nullptr;
148
+ }
149
+ }
150
+
151
+ static PyObject* SearchSuggestion_get_Kind(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
152
+ {
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
+ try
160
+ {
161
+ return py::convert(self->obj.Kind());
162
+ }
163
+ catch (...)
164
+ {
165
+ py::to_PyErr();
166
+ return nullptr;
167
+ }
168
+ }
169
+
170
+ static PyObject* SearchSuggestion_get_Tag(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
171
+ {
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
+ try
179
+ {
180
+ return py::convert(self->obj.Tag());
181
+ }
182
+ catch (...)
183
+ {
184
+ py::to_PyErr();
185
+ return nullptr;
186
+ }
187
+ }
188
+
189
+ static PyObject* SearchSuggestion_get_Text(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion* self, void* /*unused*/) noexcept
190
+ {
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
+ try
198
+ {
199
+ return py::convert(self->obj.Text());
200
+ }
201
+ catch (...)
202
+ {
203
+ py::to_PyErr();
204
+ return nullptr;
205
+ }
206
+ }
207
+
208
+ static PyObject* _assign_array_SearchSuggestion(PyObject* /*unused*/, PyObject* arg) noexcept
209
+ {
210
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestion>>();
211
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
212
+ {
213
+ return nullptr;
214
+ }
215
+ Py_RETURN_NONE;
216
+ }
217
+
218
+ static PyObject* _from_SearchSuggestion(PyObject* /*unused*/, PyObject* arg) noexcept
219
+ {
220
+ try
221
+ {
222
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
223
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestion>());
224
+ }
225
+ catch (...)
226
+ {
227
+ py::to_PyErr();
228
+ return nullptr;
229
+ }
230
+ }
231
+
232
+ static PyMethodDef _methods_SearchSuggestion[] = {
233
+ { "_assign_array_", _assign_array_SearchSuggestion, METH_O | METH_STATIC, nullptr },
234
+ { "_from", reinterpret_cast<PyCFunction>(_from_SearchSuggestion), METH_O | METH_STATIC, nullptr },
235
+ { }
236
+ };
237
+
238
+ static PyGetSetDef _getset_SearchSuggestion[] = {
239
+ { "detail_text", reinterpret_cast<getter>(SearchSuggestion_get_DetailText), nullptr, nullptr, nullptr },
240
+ { "image", reinterpret_cast<getter>(SearchSuggestion_get_Image), nullptr, nullptr, nullptr },
241
+ { "image_alternate_text", reinterpret_cast<getter>(SearchSuggestion_get_ImageAlternateText), nullptr, nullptr, nullptr },
242
+ { "kind", reinterpret_cast<getter>(SearchSuggestion_get_Kind), nullptr, nullptr, nullptr },
243
+ { "tag", reinterpret_cast<getter>(SearchSuggestion_get_Tag), nullptr, nullptr, nullptr },
244
+ { "text", reinterpret_cast<getter>(SearchSuggestion_get_Text), nullptr, nullptr, nullptr },
245
+ { }
246
+ };
247
+
248
+ static PyType_Slot _type_slots_SearchSuggestion[] =
249
+ {
250
+ { Py_tp_new, reinterpret_cast<void*>(_new_SearchSuggestion) },
251
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SearchSuggestion) },
252
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_SearchSuggestion) },
253
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_SearchSuggestion) },
254
+ { },
255
+ };
256
+
257
+ static PyType_Spec type_spec_SearchSuggestion =
258
+ {
259
+ "winrt._winrt_windows_applicationmodel_search_core.SearchSuggestion",
260
+ sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestion),
261
+ 0,
262
+ Py_TPFLAGS_DEFAULT,
263
+ _type_slots_SearchSuggestion
264
+ };
265
+
266
+ // ----- SearchSuggestionManager class --------------------
267
+
268
+ static PyObject* _new_SearchSuggestionManager(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
269
+ {
270
+ if (kwds != nullptr)
271
+ {
272
+ py::set_invalid_kwd_args_error();
273
+ return nullptr;
274
+ }
275
+
276
+ auto arg_count = PyTuple_Size(args);
277
+ if (arg_count == 0)
278
+ {
279
+ try
280
+ {
281
+ winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager instance{ };
282
+ return py::wrap(instance, type);
283
+ }
284
+ catch (...)
285
+ {
286
+ py::to_PyErr();
287
+ return nullptr;
288
+ }
289
+ }
290
+ else
291
+ {
292
+ py::set_invalid_arg_count_error(arg_count);
293
+ return nullptr;
294
+ }
295
+ }
296
+
297
+ static void _dealloc_SearchSuggestionManager(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self) noexcept
298
+ {
299
+ auto tp = Py_TYPE(self);
300
+ std::destroy_at(&self->obj);
301
+ tp->tp_free(self);
302
+ Py_DECREF(tp);
303
+ }
304
+
305
+ static PyObject* SearchSuggestionManager_AddToHistory(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* args) noexcept
306
+ {
307
+ auto arg_count = PyTuple_Size(args);
308
+
309
+ if (arg_count == 1)
310
+ {
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
+ try
318
+ {
319
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
320
+
321
+ self->obj.AddToHistory(param0);
322
+ Py_RETURN_NONE;
323
+ }
324
+ catch (...)
325
+ {
326
+ py::to_PyErr();
327
+ return nullptr;
328
+ }
329
+ }
330
+ else if (arg_count == 2)
331
+ {
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
+ try
339
+ {
340
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
341
+ auto param1 = py::convert_to<winrt::hstring>(args, 1);
342
+
343
+ self->obj.AddToHistory(param0, param1);
344
+ Py_RETURN_NONE;
345
+ }
346
+ catch (...)
347
+ {
348
+ py::to_PyErr();
349
+ return nullptr;
350
+ }
351
+ }
352
+ else
353
+ {
354
+ py::set_invalid_arg_count_error(arg_count);
355
+ return nullptr;
356
+ }
357
+ }
358
+
359
+ static PyObject* SearchSuggestionManager_ClearHistory(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* args) noexcept
360
+ {
361
+ auto arg_count = PyTuple_Size(args);
362
+
363
+ if (arg_count == 0)
364
+ {
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
+ try
372
+ {
373
+ self->obj.ClearHistory();
374
+ Py_RETURN_NONE;
375
+ }
376
+ catch (...)
377
+ {
378
+ py::to_PyErr();
379
+ return nullptr;
380
+ }
381
+ }
382
+ else
383
+ {
384
+ py::set_invalid_arg_count_error(arg_count);
385
+ return nullptr;
386
+ }
387
+ }
388
+
389
+ static PyObject* SearchSuggestionManager_SetLocalContentSuggestionSettings(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* args) noexcept
390
+ {
391
+ auto arg_count = PyTuple_Size(args);
392
+
393
+ if (arg_count == 1)
394
+ {
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
+ try
402
+ {
403
+ auto param0 = py::convert_to<winrt::Windows::ApplicationModel::Search::LocalContentSuggestionSettings>(args, 0);
404
+
405
+ self->obj.SetLocalContentSuggestionSettings(param0);
406
+ Py_RETURN_NONE;
407
+ }
408
+ catch (...)
409
+ {
410
+ py::to_PyErr();
411
+ return nullptr;
412
+ }
413
+ }
414
+ else
415
+ {
416
+ py::set_invalid_arg_count_error(arg_count);
417
+ return nullptr;
418
+ }
419
+ }
420
+
421
+ static PyObject* SearchSuggestionManager_SetQuery(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* args) noexcept
422
+ {
423
+ auto arg_count = PyTuple_Size(args);
424
+
425
+ if (arg_count == 1)
426
+ {
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
+ try
434
+ {
435
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
436
+
437
+ self->obj.SetQuery(param0);
438
+ Py_RETURN_NONE;
439
+ }
440
+ catch (...)
441
+ {
442
+ py::to_PyErr();
443
+ return nullptr;
444
+ }
445
+ }
446
+ else if (arg_count == 2)
447
+ {
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
+ try
455
+ {
456
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
457
+ auto param1 = py::convert_to<winrt::hstring>(args, 1);
458
+
459
+ self->obj.SetQuery(param0, param1);
460
+ Py_RETURN_NONE;
461
+ }
462
+ catch (...)
463
+ {
464
+ py::to_PyErr();
465
+ return nullptr;
466
+ }
467
+ }
468
+ else if (arg_count == 3)
469
+ {
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
+ try
477
+ {
478
+ auto param0 = py::convert_to<winrt::hstring>(args, 0);
479
+ auto param1 = py::convert_to<winrt::hstring>(args, 1);
480
+ auto param2 = py::convert_to<winrt::Windows::ApplicationModel::Search::SearchQueryLinguisticDetails>(args, 2);
481
+
482
+ self->obj.SetQuery(param0, param1, param2);
483
+ Py_RETURN_NONE;
484
+ }
485
+ catch (...)
486
+ {
487
+ py::to_PyErr();
488
+ return nullptr;
489
+ }
490
+ }
491
+ else
492
+ {
493
+ py::set_invalid_arg_count_error(arg_count);
494
+ return nullptr;
495
+ }
496
+ }
497
+
498
+ static PyObject* SearchSuggestionManager_get_SearchHistoryEnabled(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, void* /*unused*/) noexcept
499
+ {
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
+ try
507
+ {
508
+ return py::convert(self->obj.SearchHistoryEnabled());
509
+ }
510
+ catch (...)
511
+ {
512
+ py::to_PyErr();
513
+ return nullptr;
514
+ }
515
+ }
516
+
517
+ static int SearchSuggestionManager_put_SearchHistoryEnabled(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg, void* /*unused*/) noexcept
518
+ {
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
+ if (arg == nullptr)
526
+ {
527
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
528
+ return -1;
529
+ }
530
+
531
+ try
532
+ {
533
+ auto param0 = py::convert_to<bool>(arg);
534
+
535
+ self->obj.SearchHistoryEnabled(param0);
536
+ return 0;
537
+ }
538
+ catch (...)
539
+ {
540
+ py::to_PyErr();
541
+ return -1;
542
+ }
543
+ }
544
+
545
+ static PyObject* SearchSuggestionManager_get_SearchHistoryContext(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, void* /*unused*/) noexcept
546
+ {
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
+ try
554
+ {
555
+ return py::convert(self->obj.SearchHistoryContext());
556
+ }
557
+ catch (...)
558
+ {
559
+ py::to_PyErr();
560
+ return nullptr;
561
+ }
562
+ }
563
+
564
+ static int SearchSuggestionManager_put_SearchHistoryContext(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg, void* /*unused*/) noexcept
565
+ {
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
+ if (arg == nullptr)
573
+ {
574
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
575
+ return -1;
576
+ }
577
+
578
+ try
579
+ {
580
+ auto param0 = py::convert_to<winrt::hstring>(arg);
581
+
582
+ self->obj.SearchHistoryContext(param0);
583
+ return 0;
584
+ }
585
+ catch (...)
586
+ {
587
+ py::to_PyErr();
588
+ return -1;
589
+ }
590
+ }
591
+
592
+ static PyObject* SearchSuggestionManager_get_Suggestions(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, void* /*unused*/) noexcept
593
+ {
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
+ try
601
+ {
602
+ return py::convert(self->obj.Suggestions());
603
+ }
604
+ catch (...)
605
+ {
606
+ py::to_PyErr();
607
+ return nullptr;
608
+ }
609
+ }
610
+
611
+ static PyObject* SearchSuggestionManager_add_RequestingFocusOnKeyboardInput(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
612
+ {
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
+ try
620
+ {
621
+ auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager, winrt::Windows::ApplicationModel::Search::Core::RequestingFocusOnKeyboardInputEventArgs>>(arg);
622
+
623
+ return py::convert(self->obj.RequestingFocusOnKeyboardInput(param0));
624
+ }
625
+ catch (...)
626
+ {
627
+ py::to_PyErr();
628
+ return nullptr;
629
+ }
630
+ }
631
+
632
+ static PyObject* SearchSuggestionManager_remove_RequestingFocusOnKeyboardInput(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
633
+ {
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
+ try
641
+ {
642
+ auto param0 = py::convert_to<winrt::event_token>(arg);
643
+
644
+ self->obj.RequestingFocusOnKeyboardInput(param0);
645
+ Py_RETURN_NONE;
646
+ }
647
+ catch (...)
648
+ {
649
+ py::to_PyErr();
650
+ return nullptr;
651
+ }
652
+ }
653
+
654
+ static PyObject* SearchSuggestionManager_add_SuggestionsRequested(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
655
+ {
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
+ try
663
+ {
664
+ auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager, winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs>>(arg);
665
+
666
+ return py::convert(self->obj.SuggestionsRequested(param0));
667
+ }
668
+ catch (...)
669
+ {
670
+ py::to_PyErr();
671
+ return nullptr;
672
+ }
673
+ }
674
+
675
+ static PyObject* SearchSuggestionManager_remove_SuggestionsRequested(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager* self, PyObject* arg) noexcept
676
+ {
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
+ try
684
+ {
685
+ auto param0 = py::convert_to<winrt::event_token>(arg);
686
+
687
+ self->obj.SuggestionsRequested(param0);
688
+ Py_RETURN_NONE;
689
+ }
690
+ catch (...)
691
+ {
692
+ py::to_PyErr();
693
+ return nullptr;
694
+ }
695
+ }
696
+
697
+ static PyObject* _assign_array_SearchSuggestionManager(PyObject* /*unused*/, PyObject* arg) noexcept
698
+ {
699
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager>>();
700
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
701
+ {
702
+ return nullptr;
703
+ }
704
+ Py_RETURN_NONE;
705
+ }
706
+
707
+ static PyObject* _from_SearchSuggestionManager(PyObject* /*unused*/, PyObject* arg) noexcept
708
+ {
709
+ try
710
+ {
711
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
712
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionManager>());
713
+ }
714
+ catch (...)
715
+ {
716
+ py::to_PyErr();
717
+ return nullptr;
718
+ }
719
+ }
720
+
721
+ static PyMethodDef _methods_SearchSuggestionManager[] = {
722
+ { "add_to_history", reinterpret_cast<PyCFunction>(SearchSuggestionManager_AddToHistory), METH_VARARGS, nullptr },
723
+ { "clear_history", reinterpret_cast<PyCFunction>(SearchSuggestionManager_ClearHistory), METH_VARARGS, nullptr },
724
+ { "set_local_content_suggestion_settings", reinterpret_cast<PyCFunction>(SearchSuggestionManager_SetLocalContentSuggestionSettings), METH_VARARGS, nullptr },
725
+ { "set_query", reinterpret_cast<PyCFunction>(SearchSuggestionManager_SetQuery), METH_VARARGS, nullptr },
726
+ { "add_requesting_focus_on_keyboard_input", reinterpret_cast<PyCFunction>(SearchSuggestionManager_add_RequestingFocusOnKeyboardInput), METH_O, nullptr },
727
+ { "remove_requesting_focus_on_keyboard_input", reinterpret_cast<PyCFunction>(SearchSuggestionManager_remove_RequestingFocusOnKeyboardInput), METH_O, nullptr },
728
+ { "add_suggestions_requested", reinterpret_cast<PyCFunction>(SearchSuggestionManager_add_SuggestionsRequested), METH_O, nullptr },
729
+ { "remove_suggestions_requested", reinterpret_cast<PyCFunction>(SearchSuggestionManager_remove_SuggestionsRequested), METH_O, nullptr },
730
+ { "_assign_array_", _assign_array_SearchSuggestionManager, METH_O | METH_STATIC, nullptr },
731
+ { "_from", reinterpret_cast<PyCFunction>(_from_SearchSuggestionManager), METH_O | METH_STATIC, nullptr },
732
+ { }
733
+ };
734
+
735
+ static PyGetSetDef _getset_SearchSuggestionManager[] = {
736
+ { "search_history_enabled", reinterpret_cast<getter>(SearchSuggestionManager_get_SearchHistoryEnabled), reinterpret_cast<setter>(SearchSuggestionManager_put_SearchHistoryEnabled), nullptr, nullptr },
737
+ { "search_history_context", reinterpret_cast<getter>(SearchSuggestionManager_get_SearchHistoryContext), reinterpret_cast<setter>(SearchSuggestionManager_put_SearchHistoryContext), nullptr, nullptr },
738
+ { "suggestions", reinterpret_cast<getter>(SearchSuggestionManager_get_Suggestions), nullptr, nullptr, nullptr },
739
+ { }
740
+ };
741
+
742
+ static PyType_Slot _type_slots_SearchSuggestionManager[] =
743
+ {
744
+ { Py_tp_new, reinterpret_cast<void*>(_new_SearchSuggestionManager) },
745
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SearchSuggestionManager) },
746
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_SearchSuggestionManager) },
747
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_SearchSuggestionManager) },
748
+ { },
749
+ };
750
+
751
+ static PyType_Spec type_spec_SearchSuggestionManager =
752
+ {
753
+ "winrt._winrt_windows_applicationmodel_search_core.SearchSuggestionManager",
754
+ sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionManager),
755
+ 0,
756
+ Py_TPFLAGS_DEFAULT,
757
+ _type_slots_SearchSuggestionManager
758
+ };
759
+
760
+ // ----- SearchSuggestionsRequestedEventArgs class --------------------
761
+
762
+ static PyObject* _new_SearchSuggestionsRequestedEventArgs(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
763
+ {
764
+ static_assert(py::py_type<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs>::type_name);
765
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs>::type_name);
766
+ return nullptr;
767
+ }
768
+
769
+ static void _dealloc_SearchSuggestionsRequestedEventArgs(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self) noexcept
770
+ {
771
+ auto tp = Py_TYPE(self);
772
+ std::destroy_at(&self->obj);
773
+ tp->tp_free(self);
774
+ Py_DECREF(tp);
775
+ }
776
+
777
+ static PyObject* SearchSuggestionsRequestedEventArgs_get_Language(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
778
+ {
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
+ try
786
+ {
787
+ return py::convert(self->obj.Language());
788
+ }
789
+ catch (...)
790
+ {
791
+ py::to_PyErr();
792
+ return nullptr;
793
+ }
794
+ }
795
+
796
+ static PyObject* SearchSuggestionsRequestedEventArgs_get_LinguisticDetails(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
797
+ {
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
+ try
805
+ {
806
+ return py::convert(self->obj.LinguisticDetails());
807
+ }
808
+ catch (...)
809
+ {
810
+ py::to_PyErr();
811
+ return nullptr;
812
+ }
813
+ }
814
+
815
+ static PyObject* SearchSuggestionsRequestedEventArgs_get_QueryText(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
816
+ {
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
+ try
824
+ {
825
+ return py::convert(self->obj.QueryText());
826
+ }
827
+ catch (...)
828
+ {
829
+ py::to_PyErr();
830
+ return nullptr;
831
+ }
832
+ }
833
+
834
+ static PyObject* SearchSuggestionsRequestedEventArgs_get_Request(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs* self, void* /*unused*/) noexcept
835
+ {
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
+ try
843
+ {
844
+ return py::convert(self->obj.Request());
845
+ }
846
+ catch (...)
847
+ {
848
+ py::to_PyErr();
849
+ return nullptr;
850
+ }
851
+ }
852
+
853
+ static PyObject* _assign_array_SearchSuggestionsRequestedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
854
+ {
855
+ auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs>>();
856
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
857
+ {
858
+ return nullptr;
859
+ }
860
+ Py_RETURN_NONE;
861
+ }
862
+
863
+ static PyObject* _from_SearchSuggestionsRequestedEventArgs(PyObject* /*unused*/, PyObject* arg) noexcept
864
+ {
865
+ try
866
+ {
867
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
868
+ return py::convert(return_value.as<winrt::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs>());
869
+ }
870
+ catch (...)
871
+ {
872
+ py::to_PyErr();
873
+ return nullptr;
874
+ }
875
+ }
876
+
877
+ static PyMethodDef _methods_SearchSuggestionsRequestedEventArgs[] = {
878
+ { "_assign_array_", _assign_array_SearchSuggestionsRequestedEventArgs, METH_O | METH_STATIC, nullptr },
879
+ { "_from", reinterpret_cast<PyCFunction>(_from_SearchSuggestionsRequestedEventArgs), METH_O | METH_STATIC, nullptr },
880
+ { }
881
+ };
882
+
883
+ static PyGetSetDef _getset_SearchSuggestionsRequestedEventArgs[] = {
884
+ { "language", reinterpret_cast<getter>(SearchSuggestionsRequestedEventArgs_get_Language), nullptr, nullptr, nullptr },
885
+ { "linguistic_details", reinterpret_cast<getter>(SearchSuggestionsRequestedEventArgs_get_LinguisticDetails), nullptr, nullptr, nullptr },
886
+ { "query_text", reinterpret_cast<getter>(SearchSuggestionsRequestedEventArgs_get_QueryText), nullptr, nullptr, nullptr },
887
+ { "request", reinterpret_cast<getter>(SearchSuggestionsRequestedEventArgs_get_Request), nullptr, nullptr, nullptr },
888
+ { }
889
+ };
890
+
891
+ static PyType_Slot _type_slots_SearchSuggestionsRequestedEventArgs[] =
892
+ {
893
+ { Py_tp_new, reinterpret_cast<void*>(_new_SearchSuggestionsRequestedEventArgs) },
894
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_SearchSuggestionsRequestedEventArgs) },
895
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_SearchSuggestionsRequestedEventArgs) },
896
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_SearchSuggestionsRequestedEventArgs) },
897
+ { },
898
+ };
899
+
900
+ static PyType_Spec type_spec_SearchSuggestionsRequestedEventArgs =
901
+ {
902
+ "winrt._winrt_windows_applicationmodel_search_core.SearchSuggestionsRequestedEventArgs",
903
+ sizeof(py::wrapper::Windows::ApplicationModel::Search::Core::SearchSuggestionsRequestedEventArgs),
904
+ 0,
905
+ Py_TPFLAGS_DEFAULT,
906
+ _type_slots_SearchSuggestionsRequestedEventArgs
907
+ };
908
+
909
+ // ----- Windows.ApplicationModel.Search.Core Initialization --------------------
910
+ PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Search::Core");
911
+
912
+
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
+
924
+ } // py::cpp::Windows::ApplicationModel::Search::Core
925
+
926
+ PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_search_core(void) noexcept
927
+ {
928
+ using namespace py::cpp::Windows::ApplicationModel::Search::Core;
929
+
930
+ if (py::import_winrt_runtime() == -1)
931
+ {
932
+ return nullptr;
933
+ }
934
+
935
+ py::pyobj_handle module{PyModule_Create(&module_def)};
936
+
937
+ if (!module)
938
+ {
939
+ return nullptr;
940
+ }
941
+
942
+ auto object_type = py::get_object_type();
943
+ if (!object_type)
944
+ {
945
+ return nullptr;
946
+ }
947
+
948
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
949
+
950
+ if (!object_bases)
951
+ {
952
+ return nullptr;
953
+ }
954
+
955
+ if (py::register_python_type(module.get(), &type_spec_RequestingFocusOnKeyboardInputEventArgs, object_bases.get(), nullptr) == -1)
956
+ {
957
+ return nullptr;
958
+ }
959
+
960
+ if (py::register_python_type(module.get(), &type_spec_SearchSuggestion, object_bases.get(), nullptr) == -1)
961
+ {
962
+ return nullptr;
963
+ }
964
+
965
+ if (py::register_python_type(module.get(), &type_spec_SearchSuggestionManager, object_bases.get(), nullptr) == -1)
966
+ {
967
+ return nullptr;
968
+ }
969
+
970
+ if (py::register_python_type(module.get(), &type_spec_SearchSuggestionsRequestedEventArgs, object_bases.get(), nullptr) == -1)
971
+ {
972
+ return nullptr;
973
+ }
974
+
975
+
976
+ return module.detach();
977
+ }
@@ -0,0 +1,43 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ [build-system]
4
+ requires = ["setuptools", "setuptools-scm", "winrt-sdk"]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ name = "winrt-Windows.ApplicationModel.Search.Core"
9
+ description = "Python projection of Windows Runtime (WinRT) APIs"
10
+ readme = "README.md"
11
+ license = { text = "MIT" }
12
+ classifiers = [
13
+ "Operating System :: Microsoft :: Windows",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: Implementation :: CPython",
16
+ "Intended Audience :: Developers",
17
+ ]
18
+ dynamic = ["version", "dependencies", "optional-dependencies"]
19
+ requires-python = ">=3.9,<3.13"
20
+
21
+ [project.urls]
22
+ # Homepage = "https://github.com/pywrint/pywrinrt"
23
+ # Documentation = "https://readthedocs.org"
24
+ Repository = "https://github.com/pywrint/pywrinrt"
25
+ Changelog = "https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md"
26
+
27
+ [tool.setuptools.dynamic]
28
+ version = { file = "pywinrt-version.txt" }
29
+ dependencies = { file = "requirements.txt" }
30
+ optional-dependencies.all = { file = "all-requirements.txt" }
31
+
32
+ [tool.cibuildwheel]
33
+ # use local winrt-sdk build dependency
34
+ environment = { PYTHONPATH="../winrt-sdk/src" }
35
+ # don't install winrt-sdk from PyPI
36
+ build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
37
+ # don't build for PyPy
38
+ skip = "pp*"
39
+ # suppress warnings about ARM64 testing
40
+ test-skip = "*-win_arm64"
41
+
42
+ [tool.cibuildwheel.windows]
43
+ archs = ["x86", "AMD64", "ARM64"]
@@ -0,0 +1,3 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ winrt-runtime==2.0.0-beta.1
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
1
+ # WARNING: Please don't edit this file. It was automatically generated.
2
+
3
+ from setuptools import Extension, setup
4
+ from winrt_sdk import get_include_dirs
5
+
6
+ setup(
7
+ ext_modules=[
8
+ Extension(
9
+ "winrt._winrt_windows_applicationmodel_search_core",
10
+ sources=["py.Windows.ApplicationModel.Search.Core.cpp"],
11
+ include_dirs=get_include_dirs(),
12
+ extra_compile_args=["/std:c++20", "/permissive-"],
13
+ libraries=["windowsapp"],
14
+ )
15
+ ],
16
+ package_data={"winrt": ["*.pyi"]},
17
+ )
@@ -0,0 +1,83 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import datetime
4
+ import sys
5
+ import types
6
+ import typing
7
+ import uuid as _uuid
8
+ from builtins import property as _property
9
+
10
+ import winrt._winrt
11
+ import winrt.system
12
+ import winrt.windows.applicationmodel.search
13
+ import winrt.windows.foundation
14
+ import winrt.windows.foundation.collections
15
+ import winrt.windows.storage.streams
16
+
17
+ from winrt.windows.applicationmodel.search.core import SearchSuggestionKind
18
+
19
+ Self = typing.TypeVar('Self')
20
+
21
+ class RequestingFocusOnKeyboardInputEventArgs(winrt.system.Object):
22
+ @staticmethod
23
+ def _from(obj: winrt.system.Object, /) -> RequestingFocusOnKeyboardInputEventArgs: ...
24
+
25
+ class SearchSuggestion(winrt.system.Object):
26
+ @staticmethod
27
+ def _from(obj: winrt.system.Object, /) -> SearchSuggestion: ...
28
+ @_property
29
+ def detail_text(self) -> str: ...
30
+ @_property
31
+ def image(self) -> typing.Optional[winrt.windows.storage.streams.IRandomAccessStreamReference]: ...
32
+ @_property
33
+ def image_alternate_text(self) -> str: ...
34
+ @_property
35
+ def kind(self) -> SearchSuggestionKind: ...
36
+ @_property
37
+ def tag(self) -> str: ...
38
+ @_property
39
+ def text(self) -> str: ...
40
+
41
+ class SearchSuggestionManager(winrt.system.Object):
42
+ @staticmethod
43
+ def _from(obj: winrt.system.Object, /) -> SearchSuggestionManager: ...
44
+ def __new__(cls: typing.Type[SearchSuggestionManager]) -> SearchSuggestionManager:...
45
+ @typing.overload
46
+ def add_to_history(self, query_text: str, /) -> None: ...
47
+ @typing.overload
48
+ def add_to_history(self, query_text: str, language: str, /) -> None: ...
49
+ def clear_history(self) -> None: ...
50
+ def set_local_content_suggestion_settings(self, settings: typing.Optional[winrt.windows.applicationmodel.search.LocalContentSuggestionSettings], /) -> None: ...
51
+ @typing.overload
52
+ def set_query(self, query_text: str, /) -> None: ...
53
+ @typing.overload
54
+ def set_query(self, query_text: str, language: str, /) -> None: ...
55
+ @typing.overload
56
+ def set_query(self, query_text: str, language: str, linguistic_details: typing.Optional[winrt.windows.applicationmodel.search.SearchQueryLinguisticDetails], /) -> None: ...
57
+ def add_requesting_focus_on_keyboard_input(self, handler: winrt.windows.foundation.TypedEventHandler[SearchSuggestionManager, RequestingFocusOnKeyboardInputEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
58
+ def remove_requesting_focus_on_keyboard_input(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
59
+ def add_suggestions_requested(self, handler: winrt.windows.foundation.TypedEventHandler[SearchSuggestionManager, SearchSuggestionsRequestedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
60
+ def remove_suggestions_requested(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
61
+ @_property
62
+ def search_history_enabled(self) -> bool: ...
63
+ @search_history_enabled.setter
64
+ def search_history_enabled(self, value: bool) -> None: ...
65
+ @_property
66
+ def search_history_context(self) -> str: ...
67
+ @search_history_context.setter
68
+ def search_history_context(self, value: str) -> None: ...
69
+ @_property
70
+ def suggestions(self) -> typing.Optional[winrt.windows.foundation.collections.IObservableVector[SearchSuggestion]]: ...
71
+
72
+ class SearchSuggestionsRequestedEventArgs(winrt.system.Object):
73
+ @staticmethod
74
+ def _from(obj: winrt.system.Object, /) -> SearchSuggestionsRequestedEventArgs: ...
75
+ @_property
76
+ def language(self) -> str: ...
77
+ @_property
78
+ def linguistic_details(self) -> typing.Optional[winrt.windows.applicationmodel.search.SearchQueryLinguisticDetails]: ...
79
+ @_property
80
+ def query_text(self) -> str: ...
81
+ @_property
82
+ def request(self) -> typing.Optional[winrt.windows.applicationmodel.search.SearchSuggestionsRequest]: ...
83
+
@@ -0,0 +1,24 @@
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ import enum
4
+
5
+ import winrt.system
6
+ from winrt import _winrt_windows_applicationmodel_search_core
7
+
8
+ __all__ = [
9
+ "SearchSuggestionKind",
10
+ "RequestingFocusOnKeyboardInputEventArgs",
11
+ "SearchSuggestion",
12
+ "SearchSuggestionManager",
13
+ "SearchSuggestionsRequestedEventArgs",
14
+ ]
15
+
16
+ class SearchSuggestionKind(enum.IntEnum):
17
+ QUERY = 0
18
+ RESULT = 1
19
+ SEPARATOR = 2
20
+
21
+ RequestingFocusOnKeyboardInputEventArgs = _winrt_windows_applicationmodel_search_core.RequestingFocusOnKeyboardInputEventArgs
22
+ SearchSuggestion = _winrt_windows_applicationmodel_search_core.SearchSuggestion
23
+ SearchSuggestionManager = _winrt_windows_applicationmodel_search_core.SearchSuggestionManager
24
+ SearchSuggestionsRequestedEventArgs = _winrt_windows_applicationmodel_search_core.SearchSuggestionsRequestedEventArgs
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.ApplicationModel.Search.Core
3
+ Version: 2.0.0b1
4
+ Summary: Python projection of Windows Runtime (WinRT) APIs
5
+ License: MIT
6
+ Project-URL: Repository, https://github.com/pywrint/pywrinrt
7
+ Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: Implementation :: CPython
11
+ Classifier: Intended Audience :: Developers
12
+ Requires-Python: <3.13,>=3.9
13
+ Description-Content-Type: text/markdown
14
+ Provides-Extra: all
15
+
16
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
17
+
18
+ # winrt-Windows.ApplicationModel.Search.Core
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Search.Core` namespace.
21
+
22
+ This package provides the `winrt.windows.applicationmodel.search.core` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.ApplicationModel.Search.Core.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_applicationmodel_search_core.pyi
9
+ winrt/windows/applicationmodel/search/core/__init__.py
10
+ winrt_Windows.ApplicationModel.Search.Core.egg-info/PKG-INFO
11
+ winrt_Windows.ApplicationModel.Search.Core.egg-info/SOURCES.txt
12
+ winrt_Windows.ApplicationModel.Search.Core.egg-info/dependency_links.txt
13
+ winrt_Windows.ApplicationModel.Search.Core.egg-info/requires.txt
14
+ winrt_Windows.ApplicationModel.Search.Core.egg-info/top_level.txt
@@ -0,0 +1,7 @@
1
+ winrt-runtime==2.0.0-beta.1
2
+
3
+ [all]
4
+ winrt-Windows.ApplicationModel.Search[all]==2.0.0-beta.1
5
+ winrt-Windows.Foundation[all]==2.0.0-beta.1
6
+ winrt-Windows.Foundation.Collections[all]==2.0.0-beta.1
7
+ winrt-Windows.Storage.Streams[all]==2.0.0-beta.1