winrt-Windows.AI.Actions.Provider 3.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.
- winrt_windows_ai_actions_provider-3.2.0/PKG-INFO +26 -0
- winrt_windows_ai_actions_provider-3.2.0/README.md +7 -0
- winrt_windows_ai_actions_provider-3.2.0/all-requirements.txt +4 -0
- winrt_windows_ai_actions_provider-3.2.0/py.Windows.AI.Actions.Provider.cpp +527 -0
- winrt_windows_ai_actions_provider-3.2.0/pyproject.toml +47 -0
- winrt_windows_ai_actions_provider-3.2.0/pywinrt-version.txt +1 -0
- winrt_windows_ai_actions_provider-3.2.0/requirements.txt +3 -0
- winrt_windows_ai_actions_provider-3.2.0/setup.cfg +4 -0
- winrt_windows_ai_actions_provider-3.2.0/setup.py +33 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt/_winrt_windows_ai_actions_provider.pyi +33 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt/windows/ai/actions/provider/__init__.py +15 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt/windows/ai/actions/provider/py.typed +0 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/PKG-INFO +26 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/SOURCES.txt +15 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/dependency_links.txt +1 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/requires.txt +5 -0
- winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: winrt-Windows.AI.Actions.Provider
|
|
3
|
+
Version: 3.2.0
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
8
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: winrt-runtime==3.2.0
|
|
16
|
+
Provides-Extra: all
|
|
17
|
+
Requires-Dist: winrt-Windows.AI.Actions[all]==3.2.0; extra == "all"
|
|
18
|
+
Requires-Dist: winrt-Windows.Foundation[all]==3.2.0; extra == "all"
|
|
19
|
+
|
|
20
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
21
|
+
|
|
22
|
+
# winrt-Windows.AI.Actions.Provider
|
|
23
|
+
|
|
24
|
+
Windows Runtime (WinRT) APIs for for the `Windows.AI.Actions.Provider` namespace.
|
|
25
|
+
|
|
26
|
+
This package provides the `winrt.windows.ai.actions.provider` module.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.AI.Actions.Provider
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for for the `Windows.AI.Actions.Provider` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.ai.actions.provider` module.
|
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
// WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.0
|
|
2
|
+
|
|
3
|
+
#include "py.Windows.AI.Actions.Provider.h"
|
|
4
|
+
|
|
5
|
+
namespace py::cpp::Windows::AI::Actions::Provider
|
|
6
|
+
{
|
|
7
|
+
// ----- IActionFeedbackHandler interface --------------------
|
|
8
|
+
|
|
9
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
10
|
+
static PyObject* _new_IActionFeedbackHandler(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
11
|
+
{
|
|
12
|
+
static_assert(py::py_type<winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>::type_name);
|
|
13
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>::type_name);
|
|
14
|
+
return nullptr;
|
|
15
|
+
}
|
|
16
|
+
#endif
|
|
17
|
+
|
|
18
|
+
static void _dealloc_IActionFeedbackHandler(py::wrapper::Windows::AI::Actions::Provider::IActionFeedbackHandler* self) noexcept
|
|
19
|
+
{
|
|
20
|
+
auto tp = Py_TYPE(self);
|
|
21
|
+
std::destroy_at(&self->obj);
|
|
22
|
+
tp->tp_free(self);
|
|
23
|
+
Py_DECREF(tp);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static PyObject* IActionFeedbackHandler_ProcessFeedbackAsync(py::wrapper::Windows::AI::Actions::Provider::IActionFeedbackHandler* self, PyObject* args) noexcept
|
|
27
|
+
{
|
|
28
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
29
|
+
|
|
30
|
+
if (arg_count == 2)
|
|
31
|
+
{
|
|
32
|
+
try
|
|
33
|
+
{
|
|
34
|
+
static std::optional<bool> is_overload_present{};
|
|
35
|
+
|
|
36
|
+
if (!is_overload_present.has_value())
|
|
37
|
+
{
|
|
38
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.Actions.Provider.IActionFeedbackHandler", L"ProcessFeedbackAsync", 2);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!is_overload_present.value())
|
|
42
|
+
{
|
|
43
|
+
py::set_arg_count_version_error(2);
|
|
44
|
+
return nullptr;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
auto param0 = py::convert_to<winrt::Windows::AI::Actions::ActionInvocationContext>(args, 0);
|
|
48
|
+
auto param1 = py::convert_to<winrt::Windows::AI::Actions::ActionFeedback>(args, 1);
|
|
49
|
+
|
|
50
|
+
return py::convert([&]()
|
|
51
|
+
{
|
|
52
|
+
auto _gil = release_gil();
|
|
53
|
+
return self->obj.ProcessFeedbackAsync(param0, param1);
|
|
54
|
+
}());
|
|
55
|
+
}
|
|
56
|
+
catch (...)
|
|
57
|
+
{
|
|
58
|
+
py::to_PyErr();
|
|
59
|
+
return nullptr;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
else
|
|
63
|
+
{
|
|
64
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
65
|
+
return nullptr;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static PyMethodDef _methods_IActionFeedbackHandler[] = {
|
|
70
|
+
{ "process_feedback_async", reinterpret_cast<PyCFunction>(IActionFeedbackHandler_ProcessFeedbackAsync), METH_VARARGS, nullptr },
|
|
71
|
+
{ }};
|
|
72
|
+
|
|
73
|
+
static PyGetSetDef _getset_IActionFeedbackHandler[] = {
|
|
74
|
+
{ }};
|
|
75
|
+
|
|
76
|
+
static PyType_Slot _type_slots_IActionFeedbackHandler[] = {
|
|
77
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
78
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_IActionFeedbackHandler) },
|
|
79
|
+
#endif
|
|
80
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IActionFeedbackHandler) },
|
|
81
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IActionFeedbackHandler) },
|
|
82
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IActionFeedbackHandler) },
|
|
83
|
+
{ }};
|
|
84
|
+
|
|
85
|
+
static PyType_Spec type_spec_IActionFeedbackHandler = {
|
|
86
|
+
"winrt._winrt_windows_ai_actions_provider._IActionFeedbackHandler",
|
|
87
|
+
sizeof(py::wrapper::Windows::AI::Actions::Provider::IActionFeedbackHandler),
|
|
88
|
+
0,
|
|
89
|
+
Py_TPFLAGS_DEFAULT
|
|
90
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
91
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
92
|
+
#endif
|
|
93
|
+
,
|
|
94
|
+
_type_slots_IActionFeedbackHandler};
|
|
95
|
+
|
|
96
|
+
struct ImplementsIActionFeedbackHandler : py::ImplementsInterfaceT<ImplementsIActionFeedbackHandler, winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>
|
|
97
|
+
{
|
|
98
|
+
ImplementsIActionFeedbackHandler() = delete;
|
|
99
|
+
ImplementsIActionFeedbackHandler(PyObject* py_obj, winrt::impl::inspectable_abi* runtime_class) : py::ImplementsInterfaceT<ImplementsIActionFeedbackHandler, winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>(py_obj, runtime_class)
|
|
100
|
+
{
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
auto ProcessFeedbackAsync(winrt::Windows::AI::Actions::ActionInvocationContext const& param0, winrt::Windows::AI::Actions::ActionFeedback const& param1)
|
|
104
|
+
{
|
|
105
|
+
try
|
|
106
|
+
{
|
|
107
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
108
|
+
|
|
109
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "process_feedback_async")};
|
|
110
|
+
if (!method)
|
|
111
|
+
{
|
|
112
|
+
throw python_exception();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
py::pyobj_handle py_param0{py::convert(param0)};
|
|
116
|
+
if (!py_param0)
|
|
117
|
+
{
|
|
118
|
+
throw python_exception();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
py::pyobj_handle py_param1{py::convert(param1)};
|
|
122
|
+
if (!py_param1)
|
|
123
|
+
{
|
|
124
|
+
throw python_exception();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
py::pyobj_handle args{PyTuple_Pack(2, py_param0.get(), py_param1.get())};
|
|
128
|
+
if (!args)
|
|
129
|
+
{
|
|
130
|
+
throw python_exception();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
py::pyobj_handle return_value{PyObject_CallObject(method.get(), args.get())};
|
|
134
|
+
if (!return_value)
|
|
135
|
+
{
|
|
136
|
+
throw python_exception();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return py::convert_to<winrt::Windows::Foundation::IAsyncAction>(return_value.get());
|
|
140
|
+
}
|
|
141
|
+
catch (python_exception)
|
|
142
|
+
{
|
|
143
|
+
py::write_unraisable_and_throw();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
static PyObject* _assign_array_IActionFeedbackHandler(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
149
|
+
{
|
|
150
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>>();
|
|
151
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
152
|
+
{
|
|
153
|
+
return nullptr;
|
|
154
|
+
}
|
|
155
|
+
Py_RETURN_NONE;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
static PyObject* _from_IActionFeedbackHandler(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
159
|
+
{
|
|
160
|
+
try
|
|
161
|
+
{
|
|
162
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
163
|
+
return py::convert(return_value.as<winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>());
|
|
164
|
+
}
|
|
165
|
+
catch (...)
|
|
166
|
+
{
|
|
167
|
+
py::to_PyErr();
|
|
168
|
+
return nullptr;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
static PyObject* _guid_ImplementsIActionFeedbackHandler(PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
173
|
+
{
|
|
174
|
+
try
|
|
175
|
+
{
|
|
176
|
+
return py::convert(winrt::guid_of<winrt::Windows::AI::Actions::Provider::IActionFeedbackHandler>());
|
|
177
|
+
}
|
|
178
|
+
catch (...)
|
|
179
|
+
{
|
|
180
|
+
py::to_PyErr();
|
|
181
|
+
return nullptr;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
static PyObject* _make_ImplementsIActionFeedbackHandler(PyObject* /*unused*/, PyObject* args) noexcept
|
|
186
|
+
{
|
|
187
|
+
try
|
|
188
|
+
{
|
|
189
|
+
PyObject* py_obj;
|
|
190
|
+
winrt::impl::inspectable_abi* runtime_class;
|
|
191
|
+
|
|
192
|
+
if (!PyArg_ParseTuple(args, "On", &py_obj, &runtime_class))
|
|
193
|
+
{
|
|
194
|
+
return nullptr;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
auto iface{std::make_unique<ImplementsIActionFeedbackHandler>(py_obj, runtime_class)};
|
|
198
|
+
|
|
199
|
+
return PyLong_FromVoidPtr(iface.release());
|
|
200
|
+
}
|
|
201
|
+
catch (...)
|
|
202
|
+
{
|
|
203
|
+
py::to_PyErr();
|
|
204
|
+
return nullptr;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
static PyMethodDef methods_ImplementsIActionFeedbackHandler[] = {
|
|
209
|
+
{ "_assign_array_", _assign_array_IActionFeedbackHandler, METH_O | METH_STATIC, nullptr },
|
|
210
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_IActionFeedbackHandler), METH_O | METH_STATIC, nullptr },
|
|
211
|
+
{ "_guid_", reinterpret_cast<PyCFunction>(_guid_ImplementsIActionFeedbackHandler), METH_NOARGS | METH_STATIC, nullptr },
|
|
212
|
+
{ "_make_", reinterpret_cast<PyCFunction>(_make_ImplementsIActionFeedbackHandler), METH_VARARGS | METH_STATIC, nullptr },
|
|
213
|
+
{ }};
|
|
214
|
+
|
|
215
|
+
static PyType_Slot type_slots_ImplementsIActionFeedbackHandler[] = {
|
|
216
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_ImplementsIActionFeedbackHandler) },
|
|
217
|
+
{ }};
|
|
218
|
+
|
|
219
|
+
static PyType_Spec type_spec_ImplementsIActionFeedbackHandler = {
|
|
220
|
+
"winrt._winrt_windows_ai_actions_provider.IActionFeedbackHandler",
|
|
221
|
+
0,
|
|
222
|
+
0,
|
|
223
|
+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
|
|
224
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
225
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
226
|
+
#endif
|
|
227
|
+
,
|
|
228
|
+
type_slots_ImplementsIActionFeedbackHandler};
|
|
229
|
+
|
|
230
|
+
// ----- IActionProvider interface --------------------
|
|
231
|
+
|
|
232
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
233
|
+
static PyObject* _new_IActionProvider(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
234
|
+
{
|
|
235
|
+
static_assert(py::py_type<winrt::Windows::AI::Actions::Provider::IActionProvider>::type_name);
|
|
236
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::AI::Actions::Provider::IActionProvider>::type_name);
|
|
237
|
+
return nullptr;
|
|
238
|
+
}
|
|
239
|
+
#endif
|
|
240
|
+
|
|
241
|
+
static void _dealloc_IActionProvider(py::wrapper::Windows::AI::Actions::Provider::IActionProvider* self) noexcept
|
|
242
|
+
{
|
|
243
|
+
auto tp = Py_TYPE(self);
|
|
244
|
+
std::destroy_at(&self->obj);
|
|
245
|
+
tp->tp_free(self);
|
|
246
|
+
Py_DECREF(tp);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
static PyObject* IActionProvider_InvokeAsync(py::wrapper::Windows::AI::Actions::Provider::IActionProvider* self, PyObject* args) noexcept
|
|
250
|
+
{
|
|
251
|
+
auto arg_count = PyTuple_GET_SIZE(args);
|
|
252
|
+
|
|
253
|
+
if (arg_count == 1)
|
|
254
|
+
{
|
|
255
|
+
try
|
|
256
|
+
{
|
|
257
|
+
static std::optional<bool> is_overload_present{};
|
|
258
|
+
|
|
259
|
+
if (!is_overload_present.has_value())
|
|
260
|
+
{
|
|
261
|
+
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.AI.Actions.Provider.IActionProvider", L"InvokeAsync", 1);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (!is_overload_present.value())
|
|
265
|
+
{
|
|
266
|
+
py::set_arg_count_version_error(1);
|
|
267
|
+
return nullptr;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
auto param0 = py::convert_to<winrt::Windows::AI::Actions::ActionInvocationContext>(args, 0);
|
|
271
|
+
|
|
272
|
+
return py::convert([&]()
|
|
273
|
+
{
|
|
274
|
+
auto _gil = release_gil();
|
|
275
|
+
return self->obj.InvokeAsync(param0);
|
|
276
|
+
}());
|
|
277
|
+
}
|
|
278
|
+
catch (...)
|
|
279
|
+
{
|
|
280
|
+
py::to_PyErr();
|
|
281
|
+
return nullptr;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
else
|
|
285
|
+
{
|
|
286
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
287
|
+
return nullptr;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
static PyMethodDef _methods_IActionProvider[] = {
|
|
292
|
+
{ "invoke_async", reinterpret_cast<PyCFunction>(IActionProvider_InvokeAsync), METH_VARARGS, nullptr },
|
|
293
|
+
{ }};
|
|
294
|
+
|
|
295
|
+
static PyGetSetDef _getset_IActionProvider[] = {
|
|
296
|
+
{ }};
|
|
297
|
+
|
|
298
|
+
static PyType_Slot _type_slots_IActionProvider[] = {
|
|
299
|
+
#if PY_VERSION_HEX < 0x030A0000
|
|
300
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_IActionProvider) },
|
|
301
|
+
#endif
|
|
302
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IActionProvider) },
|
|
303
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IActionProvider) },
|
|
304
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IActionProvider) },
|
|
305
|
+
{ }};
|
|
306
|
+
|
|
307
|
+
static PyType_Spec type_spec_IActionProvider = {
|
|
308
|
+
"winrt._winrt_windows_ai_actions_provider._IActionProvider",
|
|
309
|
+
sizeof(py::wrapper::Windows::AI::Actions::Provider::IActionProvider),
|
|
310
|
+
0,
|
|
311
|
+
Py_TPFLAGS_DEFAULT
|
|
312
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
313
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
314
|
+
#endif
|
|
315
|
+
,
|
|
316
|
+
_type_slots_IActionProvider};
|
|
317
|
+
|
|
318
|
+
struct ImplementsIActionProvider : py::ImplementsInterfaceT<ImplementsIActionProvider, winrt::Windows::AI::Actions::Provider::IActionProvider>
|
|
319
|
+
{
|
|
320
|
+
ImplementsIActionProvider() = delete;
|
|
321
|
+
ImplementsIActionProvider(PyObject* py_obj, winrt::impl::inspectable_abi* runtime_class) : py::ImplementsInterfaceT<ImplementsIActionProvider, winrt::Windows::AI::Actions::Provider::IActionProvider>(py_obj, runtime_class)
|
|
322
|
+
{
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
auto InvokeAsync(winrt::Windows::AI::Actions::ActionInvocationContext const& param0)
|
|
326
|
+
{
|
|
327
|
+
try
|
|
328
|
+
{
|
|
329
|
+
py::pyobj_handle self{this->get_py_obj()};
|
|
330
|
+
|
|
331
|
+
py::pyobj_handle method{PyObject_GetAttrString(self.get(), "invoke_async")};
|
|
332
|
+
if (!method)
|
|
333
|
+
{
|
|
334
|
+
throw python_exception();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
py::pyobj_handle py_param0{py::convert(param0)};
|
|
338
|
+
if (!py_param0)
|
|
339
|
+
{
|
|
340
|
+
throw python_exception();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
py::pyobj_handle return_value{PyObject_CallOneArg(method.get(), py_param0.get())};
|
|
344
|
+
if (!return_value)
|
|
345
|
+
{
|
|
346
|
+
throw python_exception();
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
return py::convert_to<winrt::Windows::Foundation::IAsyncAction>(return_value.get());
|
|
350
|
+
}
|
|
351
|
+
catch (python_exception)
|
|
352
|
+
{
|
|
353
|
+
py::write_unraisable_and_throw();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
static PyObject* _assign_array_IActionProvider(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
359
|
+
{
|
|
360
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::AI::Actions::Provider::IActionProvider>>();
|
|
361
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
362
|
+
{
|
|
363
|
+
return nullptr;
|
|
364
|
+
}
|
|
365
|
+
Py_RETURN_NONE;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
static PyObject* _from_IActionProvider(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
369
|
+
{
|
|
370
|
+
try
|
|
371
|
+
{
|
|
372
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
373
|
+
return py::convert(return_value.as<winrt::Windows::AI::Actions::Provider::IActionProvider>());
|
|
374
|
+
}
|
|
375
|
+
catch (...)
|
|
376
|
+
{
|
|
377
|
+
py::to_PyErr();
|
|
378
|
+
return nullptr;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
static PyObject* _guid_ImplementsIActionProvider(PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
383
|
+
{
|
|
384
|
+
try
|
|
385
|
+
{
|
|
386
|
+
return py::convert(winrt::guid_of<winrt::Windows::AI::Actions::Provider::IActionProvider>());
|
|
387
|
+
}
|
|
388
|
+
catch (...)
|
|
389
|
+
{
|
|
390
|
+
py::to_PyErr();
|
|
391
|
+
return nullptr;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
static PyObject* _make_ImplementsIActionProvider(PyObject* /*unused*/, PyObject* args) noexcept
|
|
396
|
+
{
|
|
397
|
+
try
|
|
398
|
+
{
|
|
399
|
+
PyObject* py_obj;
|
|
400
|
+
winrt::impl::inspectable_abi* runtime_class;
|
|
401
|
+
|
|
402
|
+
if (!PyArg_ParseTuple(args, "On", &py_obj, &runtime_class))
|
|
403
|
+
{
|
|
404
|
+
return nullptr;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
auto iface{std::make_unique<ImplementsIActionProvider>(py_obj, runtime_class)};
|
|
408
|
+
|
|
409
|
+
return PyLong_FromVoidPtr(iface.release());
|
|
410
|
+
}
|
|
411
|
+
catch (...)
|
|
412
|
+
{
|
|
413
|
+
py::to_PyErr();
|
|
414
|
+
return nullptr;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
static PyMethodDef methods_ImplementsIActionProvider[] = {
|
|
419
|
+
{ "_assign_array_", _assign_array_IActionProvider, METH_O | METH_STATIC, nullptr },
|
|
420
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_IActionProvider), METH_O | METH_STATIC, nullptr },
|
|
421
|
+
{ "_guid_", reinterpret_cast<PyCFunction>(_guid_ImplementsIActionProvider), METH_NOARGS | METH_STATIC, nullptr },
|
|
422
|
+
{ "_make_", reinterpret_cast<PyCFunction>(_make_ImplementsIActionProvider), METH_VARARGS | METH_STATIC, nullptr },
|
|
423
|
+
{ }};
|
|
424
|
+
|
|
425
|
+
static PyType_Slot type_slots_ImplementsIActionProvider[] = {
|
|
426
|
+
{ Py_tp_methods, reinterpret_cast<void*>(methods_ImplementsIActionProvider) },
|
|
427
|
+
{ }};
|
|
428
|
+
|
|
429
|
+
static PyType_Spec type_spec_ImplementsIActionProvider = {
|
|
430
|
+
"winrt._winrt_windows_ai_actions_provider.IActionProvider",
|
|
431
|
+
0,
|
|
432
|
+
0,
|
|
433
|
+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
|
|
434
|
+
#if PY_VERSION_HEX >= 0x030A0000
|
|
435
|
+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
|
|
436
|
+
#endif
|
|
437
|
+
,
|
|
438
|
+
type_slots_ImplementsIActionProvider};
|
|
439
|
+
|
|
440
|
+
// ----- Windows.AI.Actions.Provider Initialization --------------------
|
|
441
|
+
|
|
442
|
+
PyDoc_STRVAR(module_doc, "Windows.AI.Actions.Provider");
|
|
443
|
+
|
|
444
|
+
static PyModuleDef module_def = {
|
|
445
|
+
PyModuleDef_HEAD_INIT,
|
|
446
|
+
"_winrt_windows_ai_actions_provider",
|
|
447
|
+
module_doc,
|
|
448
|
+
0,
|
|
449
|
+
nullptr,
|
|
450
|
+
nullptr,
|
|
451
|
+
nullptr,
|
|
452
|
+
nullptr,
|
|
453
|
+
nullptr};
|
|
454
|
+
} // py::cpp::Windows::AI::Actions::Provider
|
|
455
|
+
|
|
456
|
+
PyMODINIT_FUNC PyInit__winrt_windows_ai_actions_provider(void) noexcept
|
|
457
|
+
{
|
|
458
|
+
using namespace py::cpp::Windows::AI::Actions::Provider;
|
|
459
|
+
|
|
460
|
+
if (py::import_winrt_runtime() == -1)
|
|
461
|
+
{
|
|
462
|
+
return nullptr;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
466
|
+
|
|
467
|
+
if (!module)
|
|
468
|
+
{
|
|
469
|
+
return nullptr;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
auto inspectable_meta_type = py::get_inspectable_meta_type();
|
|
473
|
+
if (!inspectable_meta_type)
|
|
474
|
+
{
|
|
475
|
+
return nullptr;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
auto object_type = py::get_object_type();
|
|
479
|
+
if (!object_type)
|
|
480
|
+
{
|
|
481
|
+
return nullptr;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
485
|
+
|
|
486
|
+
if (!object_bases)
|
|
487
|
+
{
|
|
488
|
+
return nullptr;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
py::pytype_handle IActionFeedbackHandler_type{py::register_python_type(module.get(), &type_spec_IActionFeedbackHandler, object_bases.get(), nullptr)};
|
|
492
|
+
if (!IActionFeedbackHandler_type)
|
|
493
|
+
{
|
|
494
|
+
return nullptr;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
py::pytype_handle ImplementsIActionFeedbackHandler_type{py::register_python_type(module.get(), &type_spec_ImplementsIActionFeedbackHandler, nullptr, inspectable_meta_type)};
|
|
498
|
+
if (!ImplementsIActionFeedbackHandler_type)
|
|
499
|
+
{
|
|
500
|
+
return nullptr;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
if (PyModule_AddType(module.get(), ImplementsIActionFeedbackHandler_type.get()) == -1)
|
|
504
|
+
{
|
|
505
|
+
return nullptr;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
py::pytype_handle IActionProvider_type{py::register_python_type(module.get(), &type_spec_IActionProvider, object_bases.get(), nullptr)};
|
|
509
|
+
if (!IActionProvider_type)
|
|
510
|
+
{
|
|
511
|
+
return nullptr;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
py::pytype_handle ImplementsIActionProvider_type{py::register_python_type(module.get(), &type_spec_ImplementsIActionProvider, nullptr, inspectable_meta_type)};
|
|
515
|
+
if (!ImplementsIActionProvider_type)
|
|
516
|
+
{
|
|
517
|
+
return nullptr;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
if (PyModule_AddType(module.get(), ImplementsIActionProvider_type.get()) == -1)
|
|
521
|
+
{
|
|
522
|
+
return nullptr;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
return module.detach();
|
|
527
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["setuptools>=78", "winrt-sdk"]
|
|
5
|
+
build-backend = "setuptools.build_meta"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Windows.AI.Actions.Provider"
|
|
9
|
+
description = "Python projection of Windows Runtime (WinRT) APIs"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
license = "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"
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
# Homepage = "https://github.com/pywinrt/pywinrt"
|
|
23
|
+
Documentation = "https://pywinrt.readthedocs.io"
|
|
24
|
+
Repository = "https://github.com/pywinrt/pywinrt"
|
|
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.setuptools.package-data]
|
|
33
|
+
"*" = ["*.pyi", "py.typed"]
|
|
34
|
+
|
|
35
|
+
[tool.cibuildwheel]
|
|
36
|
+
# use local winrt-sdk build dependency
|
|
37
|
+
environment = { PYTHONPATH="../../winrt-sdk/src" }
|
|
38
|
+
# don't install winrt-sdk from PyPI
|
|
39
|
+
build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
40
|
+
before-build = "uv pip install setuptools"
|
|
41
|
+
# don't build for PyPy
|
|
42
|
+
skip = "pp*"
|
|
43
|
+
# suppress warnings about ARM64 testing
|
|
44
|
+
test-skip = "*-win_arm64"
|
|
45
|
+
|
|
46
|
+
[tool.cibuildwheel.windows]
|
|
47
|
+
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.2.0
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
from setuptools import Extension, setup
|
|
4
|
+
from setuptools.command.build_ext import build_ext
|
|
5
|
+
from winrt_sdk import get_include_dirs
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class build_ext_ex(build_ext):
|
|
9
|
+
def build_extension(self, ext):
|
|
10
|
+
if self.compiler.compiler_type == "msvc":
|
|
11
|
+
ext.extra_compile_args = ["/std:c++20", "/permissive-"]
|
|
12
|
+
elif self.compiler.compiler_type == "mingw32":
|
|
13
|
+
ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
|
|
14
|
+
# GCC 15 complains about some things that it didn't in the past
|
|
15
|
+
ext.extra_compile_args += ["-Wno-strict-aliasing", "-Wno-template-body"]
|
|
16
|
+
ext.extra_link_args = ["-loleaut32"]
|
|
17
|
+
else:
|
|
18
|
+
raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
|
|
19
|
+
|
|
20
|
+
build_ext.build_extension(self, ext)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
setup(
|
|
24
|
+
cmdclass={"build_ext": build_ext_ex},
|
|
25
|
+
ext_modules=[
|
|
26
|
+
Extension(
|
|
27
|
+
"winrt._winrt_windows_ai_actions_provider",
|
|
28
|
+
sources=["py.Windows.AI.Actions.Provider.cpp"],
|
|
29
|
+
include_dirs=get_include_dirs(),
|
|
30
|
+
libraries=["windowsapp"],
|
|
31
|
+
)
|
|
32
|
+
],
|
|
33
|
+
)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.0
|
|
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
|
+
from abc import abstractmethod
|
|
10
|
+
|
|
11
|
+
import winrt._winrt
|
|
12
|
+
import winrt.system
|
|
13
|
+
import winrt.windows.ai.actions as windows_ai_actions
|
|
14
|
+
import winrt.windows.foundation as windows_foundation
|
|
15
|
+
|
|
16
|
+
Self = typing.TypeVar('Self')
|
|
17
|
+
|
|
18
|
+
@typing.final
|
|
19
|
+
class _IActionFeedbackHandler: ...
|
|
20
|
+
|
|
21
|
+
class IActionFeedbackHandler(winrt._winrt.IInspectable):
|
|
22
|
+
# Windows.Foundation.IAsyncAction Windows.AI.Actions.Provider.IActionFeedbackHandler::ProcessFeedbackAsync(Windows.AI.Actions.ActionInvocationContext,Windows.AI.Actions.ActionFeedback)
|
|
23
|
+
@abstractmethod
|
|
24
|
+
def process_feedback_async(self, context: windows_ai_actions.ActionInvocationContext, feedback: windows_ai_actions.ActionFeedback, /) -> windows_foundation.IAsyncAction: ...
|
|
25
|
+
|
|
26
|
+
@typing.final
|
|
27
|
+
class _IActionProvider: ...
|
|
28
|
+
|
|
29
|
+
class IActionProvider(winrt._winrt.IInspectable):
|
|
30
|
+
# Windows.Foundation.IAsyncAction Windows.AI.Actions.Provider.IActionProvider::InvokeAsync(Windows.AI.Actions.ActionInvocationContext)
|
|
31
|
+
@abstractmethod
|
|
32
|
+
def invoke_async(self, context: windows_ai_actions.ActionInvocationContext, /) -> windows_foundation.IAsyncAction: ...
|
|
33
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.0
|
|
2
|
+
|
|
3
|
+
import winrt.system
|
|
4
|
+
from winrt._winrt_windows_ai_actions_provider import (
|
|
5
|
+
_IActionFeedbackHandler,
|
|
6
|
+
IActionFeedbackHandler,
|
|
7
|
+
_IActionProvider,
|
|
8
|
+
IActionProvider,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
__all__ = [
|
|
12
|
+
"IActionFeedbackHandler",
|
|
13
|
+
"IActionProvider",
|
|
14
|
+
]
|
|
15
|
+
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: winrt-Windows.AI.Actions.Provider
|
|
3
|
+
Version: 3.2.0
|
|
4
|
+
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
7
|
+
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
8
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
9
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: winrt-runtime==3.2.0
|
|
16
|
+
Provides-Extra: all
|
|
17
|
+
Requires-Dist: winrt-Windows.AI.Actions[all]==3.2.0; extra == "all"
|
|
18
|
+
Requires-Dist: winrt-Windows.Foundation[all]==3.2.0; extra == "all"
|
|
19
|
+
|
|
20
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
21
|
+
|
|
22
|
+
# winrt-Windows.AI.Actions.Provider
|
|
23
|
+
|
|
24
|
+
Windows Runtime (WinRT) APIs for for the `Windows.AI.Actions.Provider` namespace.
|
|
25
|
+
|
|
26
|
+
This package provides the `winrt.windows.ai.actions.provider` module.
|
winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/SOURCES.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
all-requirements.txt
|
|
3
|
+
py.Windows.AI.Actions.Provider.cpp
|
|
4
|
+
pyproject.toml
|
|
5
|
+
pywinrt-version.txt
|
|
6
|
+
requirements.txt
|
|
7
|
+
setup.py
|
|
8
|
+
winrt/_winrt_windows_ai_actions_provider.pyi
|
|
9
|
+
winrt/windows/ai/actions/provider/__init__.py
|
|
10
|
+
winrt/windows/ai/actions/provider/py.typed
|
|
11
|
+
winrt_Windows.AI.Actions.Provider.egg-info/PKG-INFO
|
|
12
|
+
winrt_Windows.AI.Actions.Provider.egg-info/SOURCES.txt
|
|
13
|
+
winrt_Windows.AI.Actions.Provider.egg-info/dependency_links.txt
|
|
14
|
+
winrt_Windows.AI.Actions.Provider.egg-info/requires.txt
|
|
15
|
+
winrt_Windows.AI.Actions.Provider.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
winrt_windows_ai_actions_provider-3.2.0/winrt_Windows.AI.Actions.Provider.egg-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
winrt
|