winrt-Windows.ApplicationModel.Resources.Management 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.
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/PKG-INFO +22 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/README.md +7 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/all-requirements.txt +4 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/py.Windows.ApplicationModel.Resources.Management.cpp +554 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/pyproject.toml +43 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/pywinrt-version.txt +1 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/requirements.txt +3 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/setup.cfg +4 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/setup.py +17 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt/_winrt_windows_applicationmodel_resources_management.pyi +51 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt/windows/applicationmodel/resources/management/__init__.py +22 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt_Windows.ApplicationModel.Resources.Management.egg-info/PKG-INFO +22 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt_Windows.ApplicationModel.Resources.Management.egg-info/SOURCES.txt +14 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt_Windows.ApplicationModel.Resources.Management.egg-info/dependency_links.txt +1 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt_Windows.ApplicationModel.Resources.Management.egg-info/requires.txt +5 -0
- winrt-Windows.ApplicationModel.Resources.Management-2.0.0b1/winrt_Windows.ApplicationModel.Resources.Management.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.ApplicationModel.Resources.Management
|
|
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.Resources.Management
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Resources.Management` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.applicationmodel.resources.management` module.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.ApplicationModel.Resources.Management
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Resources.Management` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.applicationmodel.resources.management` module.
|
|
@@ -0,0 +1,554 @@
|
|
|
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.Resources.Management.h"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
namespace py::cpp::Windows::ApplicationModel::Resources::Management
|
|
7
|
+
{
|
|
8
|
+
// ----- IndexedResourceCandidate class --------------------
|
|
9
|
+
|
|
10
|
+
static PyObject* _new_IndexedResourceCandidate(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
11
|
+
{
|
|
12
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate>::type_name);
|
|
13
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate>::type_name);
|
|
14
|
+
return nullptr;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static void _dealloc_IndexedResourceCandidate(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* 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* IndexedResourceCandidate_GetQualifierValue(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* self, PyObject* args) noexcept
|
|
26
|
+
{
|
|
27
|
+
auto arg_count = PyTuple_Size(args);
|
|
28
|
+
|
|
29
|
+
if (arg_count == 1)
|
|
30
|
+
{
|
|
31
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate", L"GetQualifierValue", 1))
|
|
32
|
+
{
|
|
33
|
+
py::set_arg_count_version_error(1);
|
|
34
|
+
return nullptr;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
try
|
|
38
|
+
{
|
|
39
|
+
auto param0 = py::convert_to<winrt::hstring>(args, 0);
|
|
40
|
+
|
|
41
|
+
return py::convert(self->obj.GetQualifierValue(param0));
|
|
42
|
+
}
|
|
43
|
+
catch (...)
|
|
44
|
+
{
|
|
45
|
+
py::to_PyErr();
|
|
46
|
+
return nullptr;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
{
|
|
51
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
52
|
+
return nullptr;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static PyObject* IndexedResourceCandidate_get_Metadata(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* self, void* /*unused*/) noexcept
|
|
57
|
+
{
|
|
58
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate", L"Metadata"))
|
|
59
|
+
{
|
|
60
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
61
|
+
return nullptr;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
try
|
|
65
|
+
{
|
|
66
|
+
return py::convert(self->obj.Metadata());
|
|
67
|
+
}
|
|
68
|
+
catch (...)
|
|
69
|
+
{
|
|
70
|
+
py::to_PyErr();
|
|
71
|
+
return nullptr;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static PyObject* IndexedResourceCandidate_get_Qualifiers(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* self, void* /*unused*/) noexcept
|
|
76
|
+
{
|
|
77
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate", L"Qualifiers"))
|
|
78
|
+
{
|
|
79
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
80
|
+
return nullptr;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
try
|
|
84
|
+
{
|
|
85
|
+
return py::convert(self->obj.Qualifiers());
|
|
86
|
+
}
|
|
87
|
+
catch (...)
|
|
88
|
+
{
|
|
89
|
+
py::to_PyErr();
|
|
90
|
+
return nullptr;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static PyObject* IndexedResourceCandidate_get_Type(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* self, void* /*unused*/) noexcept
|
|
95
|
+
{
|
|
96
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate", L"Type"))
|
|
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.Type());
|
|
105
|
+
}
|
|
106
|
+
catch (...)
|
|
107
|
+
{
|
|
108
|
+
py::to_PyErr();
|
|
109
|
+
return nullptr;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static PyObject* IndexedResourceCandidate_get_Uri(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* self, void* /*unused*/) noexcept
|
|
114
|
+
{
|
|
115
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate", L"Uri"))
|
|
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.Uri());
|
|
124
|
+
}
|
|
125
|
+
catch (...)
|
|
126
|
+
{
|
|
127
|
+
py::to_PyErr();
|
|
128
|
+
return nullptr;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static PyObject* IndexedResourceCandidate_get_ValueAsString(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate* self, void* /*unused*/) noexcept
|
|
133
|
+
{
|
|
134
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceCandidate", L"ValueAsString"))
|
|
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.ValueAsString());
|
|
143
|
+
}
|
|
144
|
+
catch (...)
|
|
145
|
+
{
|
|
146
|
+
py::to_PyErr();
|
|
147
|
+
return nullptr;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
static PyObject* _assign_array_IndexedResourceCandidate(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
152
|
+
{
|
|
153
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate>>();
|
|
154
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
155
|
+
{
|
|
156
|
+
return nullptr;
|
|
157
|
+
}
|
|
158
|
+
Py_RETURN_NONE;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static PyObject* _from_IndexedResourceCandidate(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
162
|
+
{
|
|
163
|
+
try
|
|
164
|
+
{
|
|
165
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
166
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate>());
|
|
167
|
+
}
|
|
168
|
+
catch (...)
|
|
169
|
+
{
|
|
170
|
+
py::to_PyErr();
|
|
171
|
+
return nullptr;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
static PyMethodDef _methods_IndexedResourceCandidate[] = {
|
|
176
|
+
{ "get_qualifier_value", reinterpret_cast<PyCFunction>(IndexedResourceCandidate_GetQualifierValue), METH_VARARGS, nullptr },
|
|
177
|
+
{ "_assign_array_", _assign_array_IndexedResourceCandidate, METH_O | METH_STATIC, nullptr },
|
|
178
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_IndexedResourceCandidate), METH_O | METH_STATIC, nullptr },
|
|
179
|
+
{ }
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
static PyGetSetDef _getset_IndexedResourceCandidate[] = {
|
|
183
|
+
{ "metadata", reinterpret_cast<getter>(IndexedResourceCandidate_get_Metadata), nullptr, nullptr, nullptr },
|
|
184
|
+
{ "qualifiers", reinterpret_cast<getter>(IndexedResourceCandidate_get_Qualifiers), nullptr, nullptr, nullptr },
|
|
185
|
+
{ "type", reinterpret_cast<getter>(IndexedResourceCandidate_get_Type), nullptr, nullptr, nullptr },
|
|
186
|
+
{ "uri", reinterpret_cast<getter>(IndexedResourceCandidate_get_Uri), nullptr, nullptr, nullptr },
|
|
187
|
+
{ "value_as_string", reinterpret_cast<getter>(IndexedResourceCandidate_get_ValueAsString), nullptr, nullptr, nullptr },
|
|
188
|
+
{ }
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
static PyType_Slot _type_slots_IndexedResourceCandidate[] =
|
|
192
|
+
{
|
|
193
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_IndexedResourceCandidate) },
|
|
194
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IndexedResourceCandidate) },
|
|
195
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IndexedResourceCandidate) },
|
|
196
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IndexedResourceCandidate) },
|
|
197
|
+
{ },
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
static PyType_Spec type_spec_IndexedResourceCandidate =
|
|
201
|
+
{
|
|
202
|
+
"winrt._winrt_windows_applicationmodel_resources_management.IndexedResourceCandidate",
|
|
203
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceCandidate),
|
|
204
|
+
0,
|
|
205
|
+
Py_TPFLAGS_DEFAULT,
|
|
206
|
+
_type_slots_IndexedResourceCandidate
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
// ----- IndexedResourceQualifier class --------------------
|
|
210
|
+
|
|
211
|
+
static PyObject* _new_IndexedResourceQualifier(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
212
|
+
{
|
|
213
|
+
static_assert(py::py_type<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier>::type_name);
|
|
214
|
+
py::set_invalid_activation_error(py::py_type<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier>::type_name);
|
|
215
|
+
return nullptr;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
static void _dealloc_IndexedResourceQualifier(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier* self) noexcept
|
|
219
|
+
{
|
|
220
|
+
auto tp = Py_TYPE(self);
|
|
221
|
+
std::destroy_at(&self->obj);
|
|
222
|
+
tp->tp_free(self);
|
|
223
|
+
Py_DECREF(tp);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static PyObject* IndexedResourceQualifier_get_QualifierName(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier* self, void* /*unused*/) noexcept
|
|
227
|
+
{
|
|
228
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceQualifier", L"QualifierName"))
|
|
229
|
+
{
|
|
230
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
231
|
+
return nullptr;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
try
|
|
235
|
+
{
|
|
236
|
+
return py::convert(self->obj.QualifierName());
|
|
237
|
+
}
|
|
238
|
+
catch (...)
|
|
239
|
+
{
|
|
240
|
+
py::to_PyErr();
|
|
241
|
+
return nullptr;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static PyObject* IndexedResourceQualifier_get_QualifierValue(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier* self, void* /*unused*/) noexcept
|
|
246
|
+
{
|
|
247
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.ApplicationModel.Resources.Management.IndexedResourceQualifier", L"QualifierValue"))
|
|
248
|
+
{
|
|
249
|
+
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
250
|
+
return nullptr;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
try
|
|
254
|
+
{
|
|
255
|
+
return py::convert(self->obj.QualifierValue());
|
|
256
|
+
}
|
|
257
|
+
catch (...)
|
|
258
|
+
{
|
|
259
|
+
py::to_PyErr();
|
|
260
|
+
return nullptr;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
static PyObject* _assign_array_IndexedResourceQualifier(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
265
|
+
{
|
|
266
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier>>();
|
|
267
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
268
|
+
{
|
|
269
|
+
return nullptr;
|
|
270
|
+
}
|
|
271
|
+
Py_RETURN_NONE;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
static PyObject* _from_IndexedResourceQualifier(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
275
|
+
{
|
|
276
|
+
try
|
|
277
|
+
{
|
|
278
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
279
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier>());
|
|
280
|
+
}
|
|
281
|
+
catch (...)
|
|
282
|
+
{
|
|
283
|
+
py::to_PyErr();
|
|
284
|
+
return nullptr;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
static PyMethodDef _methods_IndexedResourceQualifier[] = {
|
|
289
|
+
{ "_assign_array_", _assign_array_IndexedResourceQualifier, METH_O | METH_STATIC, nullptr },
|
|
290
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_IndexedResourceQualifier), METH_O | METH_STATIC, nullptr },
|
|
291
|
+
{ }
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
static PyGetSetDef _getset_IndexedResourceQualifier[] = {
|
|
295
|
+
{ "qualifier_name", reinterpret_cast<getter>(IndexedResourceQualifier_get_QualifierName), nullptr, nullptr, nullptr },
|
|
296
|
+
{ "qualifier_value", reinterpret_cast<getter>(IndexedResourceQualifier_get_QualifierValue), nullptr, nullptr, nullptr },
|
|
297
|
+
{ }
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
static PyType_Slot _type_slots_IndexedResourceQualifier[] =
|
|
301
|
+
{
|
|
302
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_IndexedResourceQualifier) },
|
|
303
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IndexedResourceQualifier) },
|
|
304
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_IndexedResourceQualifier) },
|
|
305
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_IndexedResourceQualifier) },
|
|
306
|
+
{ },
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
static PyType_Spec type_spec_IndexedResourceQualifier =
|
|
310
|
+
{
|
|
311
|
+
"winrt._winrt_windows_applicationmodel_resources_management.IndexedResourceQualifier",
|
|
312
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Resources::Management::IndexedResourceQualifier),
|
|
313
|
+
0,
|
|
314
|
+
Py_TPFLAGS_DEFAULT,
|
|
315
|
+
_type_slots_IndexedResourceQualifier
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
// ----- ResourceIndexer class --------------------
|
|
319
|
+
|
|
320
|
+
static PyObject* _new_ResourceIndexer(PyTypeObject* type, PyObject* args, PyObject* kwds) noexcept
|
|
321
|
+
{
|
|
322
|
+
if (kwds != nullptr)
|
|
323
|
+
{
|
|
324
|
+
py::set_invalid_kwd_args_error();
|
|
325
|
+
return nullptr;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
auto arg_count = PyTuple_Size(args);
|
|
329
|
+
if (arg_count == 2)
|
|
330
|
+
{
|
|
331
|
+
try
|
|
332
|
+
{
|
|
333
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
|
|
334
|
+
auto param1 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 1);
|
|
335
|
+
|
|
336
|
+
winrt::Windows::ApplicationModel::Resources::Management::ResourceIndexer instance{ param0, param1 };
|
|
337
|
+
return py::wrap(instance, type);
|
|
338
|
+
}
|
|
339
|
+
catch (...)
|
|
340
|
+
{
|
|
341
|
+
py::to_PyErr();
|
|
342
|
+
return nullptr;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
else if (arg_count == 1)
|
|
346
|
+
{
|
|
347
|
+
try
|
|
348
|
+
{
|
|
349
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
|
|
350
|
+
|
|
351
|
+
winrt::Windows::ApplicationModel::Resources::Management::ResourceIndexer instance{ param0 };
|
|
352
|
+
return py::wrap(instance, type);
|
|
353
|
+
}
|
|
354
|
+
catch (...)
|
|
355
|
+
{
|
|
356
|
+
py::to_PyErr();
|
|
357
|
+
return nullptr;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
else
|
|
361
|
+
{
|
|
362
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
363
|
+
return nullptr;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
static void _dealloc_ResourceIndexer(py::wrapper::Windows::ApplicationModel::Resources::Management::ResourceIndexer* self) noexcept
|
|
368
|
+
{
|
|
369
|
+
auto tp = Py_TYPE(self);
|
|
370
|
+
std::destroy_at(&self->obj);
|
|
371
|
+
tp->tp_free(self);
|
|
372
|
+
Py_DECREF(tp);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
static PyObject* ResourceIndexer_IndexFileContentsAsync(py::wrapper::Windows::ApplicationModel::Resources::Management::ResourceIndexer* self, PyObject* args) noexcept
|
|
376
|
+
{
|
|
377
|
+
auto arg_count = PyTuple_Size(args);
|
|
378
|
+
|
|
379
|
+
if (arg_count == 1)
|
|
380
|
+
{
|
|
381
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Resources.Management.ResourceIndexer", L"IndexFileContentsAsync", 1))
|
|
382
|
+
{
|
|
383
|
+
py::set_arg_count_version_error(1);
|
|
384
|
+
return nullptr;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
try
|
|
388
|
+
{
|
|
389
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
|
|
390
|
+
|
|
391
|
+
return py::convert(self->obj.IndexFileContentsAsync(param0));
|
|
392
|
+
}
|
|
393
|
+
catch (...)
|
|
394
|
+
{
|
|
395
|
+
py::to_PyErr();
|
|
396
|
+
return nullptr;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
else
|
|
400
|
+
{
|
|
401
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
402
|
+
return nullptr;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
static PyObject* ResourceIndexer_IndexFilePath(py::wrapper::Windows::ApplicationModel::Resources::Management::ResourceIndexer* self, PyObject* args) noexcept
|
|
407
|
+
{
|
|
408
|
+
auto arg_count = PyTuple_Size(args);
|
|
409
|
+
|
|
410
|
+
if (arg_count == 1)
|
|
411
|
+
{
|
|
412
|
+
if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.ApplicationModel.Resources.Management.ResourceIndexer", L"IndexFilePath", 1))
|
|
413
|
+
{
|
|
414
|
+
py::set_arg_count_version_error(1);
|
|
415
|
+
return nullptr;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
try
|
|
419
|
+
{
|
|
420
|
+
auto param0 = py::convert_to<winrt::Windows::Foundation::Uri>(args, 0);
|
|
421
|
+
|
|
422
|
+
return py::convert(self->obj.IndexFilePath(param0));
|
|
423
|
+
}
|
|
424
|
+
catch (...)
|
|
425
|
+
{
|
|
426
|
+
py::to_PyErr();
|
|
427
|
+
return nullptr;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
else
|
|
431
|
+
{
|
|
432
|
+
py::set_invalid_arg_count_error(arg_count);
|
|
433
|
+
return nullptr;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
static PyObject* _assign_array_ResourceIndexer(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
438
|
+
{
|
|
439
|
+
auto array = std::make_unique<py::ComArray<winrt::Windows::ApplicationModel::Resources::Management::ResourceIndexer>>();
|
|
440
|
+
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
441
|
+
{
|
|
442
|
+
return nullptr;
|
|
443
|
+
}
|
|
444
|
+
Py_RETURN_NONE;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
static PyObject* _from_ResourceIndexer(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
448
|
+
{
|
|
449
|
+
try
|
|
450
|
+
{
|
|
451
|
+
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
452
|
+
return py::convert(return_value.as<winrt::Windows::ApplicationModel::Resources::Management::ResourceIndexer>());
|
|
453
|
+
}
|
|
454
|
+
catch (...)
|
|
455
|
+
{
|
|
456
|
+
py::to_PyErr();
|
|
457
|
+
return nullptr;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
static PyMethodDef _methods_ResourceIndexer[] = {
|
|
462
|
+
{ "index_file_contents_async", reinterpret_cast<PyCFunction>(ResourceIndexer_IndexFileContentsAsync), METH_VARARGS, nullptr },
|
|
463
|
+
{ "index_file_path", reinterpret_cast<PyCFunction>(ResourceIndexer_IndexFilePath), METH_VARARGS, nullptr },
|
|
464
|
+
{ "_assign_array_", _assign_array_ResourceIndexer, METH_O | METH_STATIC, nullptr },
|
|
465
|
+
{ "_from", reinterpret_cast<PyCFunction>(_from_ResourceIndexer), METH_O | METH_STATIC, nullptr },
|
|
466
|
+
{ }
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
static PyGetSetDef _getset_ResourceIndexer[] = {
|
|
470
|
+
{ }
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
static PyType_Slot _type_slots_ResourceIndexer[] =
|
|
474
|
+
{
|
|
475
|
+
{ Py_tp_new, reinterpret_cast<void*>(_new_ResourceIndexer) },
|
|
476
|
+
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ResourceIndexer) },
|
|
477
|
+
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ResourceIndexer) },
|
|
478
|
+
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ResourceIndexer) },
|
|
479
|
+
{ },
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
static PyType_Spec type_spec_ResourceIndexer =
|
|
483
|
+
{
|
|
484
|
+
"winrt._winrt_windows_applicationmodel_resources_management.ResourceIndexer",
|
|
485
|
+
sizeof(py::wrapper::Windows::ApplicationModel::Resources::Management::ResourceIndexer),
|
|
486
|
+
0,
|
|
487
|
+
Py_TPFLAGS_DEFAULT,
|
|
488
|
+
_type_slots_ResourceIndexer
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
// ----- Windows.ApplicationModel.Resources.Management Initialization --------------------
|
|
492
|
+
PyDoc_STRVAR(module_doc, "Windows::ApplicationModel::Resources::Management");
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
static PyModuleDef module_def
|
|
496
|
+
= {PyModuleDef_HEAD_INIT,
|
|
497
|
+
"_winrt_windows_applicationmodel_resources_management",
|
|
498
|
+
module_doc,
|
|
499
|
+
0,
|
|
500
|
+
nullptr,
|
|
501
|
+
nullptr,
|
|
502
|
+
nullptr,
|
|
503
|
+
nullptr,
|
|
504
|
+
nullptr};
|
|
505
|
+
|
|
506
|
+
} // py::cpp::Windows::ApplicationModel::Resources::Management
|
|
507
|
+
|
|
508
|
+
PyMODINIT_FUNC PyInit__winrt_windows_applicationmodel_resources_management(void) noexcept
|
|
509
|
+
{
|
|
510
|
+
using namespace py::cpp::Windows::ApplicationModel::Resources::Management;
|
|
511
|
+
|
|
512
|
+
if (py::import_winrt_runtime() == -1)
|
|
513
|
+
{
|
|
514
|
+
return nullptr;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
518
|
+
|
|
519
|
+
if (!module)
|
|
520
|
+
{
|
|
521
|
+
return nullptr;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
auto object_type = py::get_object_type();
|
|
525
|
+
if (!object_type)
|
|
526
|
+
{
|
|
527
|
+
return nullptr;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
531
|
+
|
|
532
|
+
if (!object_bases)
|
|
533
|
+
{
|
|
534
|
+
return nullptr;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
if (py::register_python_type(module.get(), &type_spec_IndexedResourceCandidate, object_bases.get(), nullptr) == -1)
|
|
538
|
+
{
|
|
539
|
+
return nullptr;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
if (py::register_python_type(module.get(), &type_spec_IndexedResourceQualifier, object_bases.get(), nullptr) == -1)
|
|
543
|
+
{
|
|
544
|
+
return nullptr;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
if (py::register_python_type(module.get(), &type_spec_ResourceIndexer, object_bases.get(), nullptr) == -1)
|
|
548
|
+
{
|
|
549
|
+
return nullptr;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
return module.detach();
|
|
554
|
+
}
|
|
@@ -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.Resources.Management"
|
|
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 @@
|
|
|
1
|
+
2.0.0-beta.1
|
|
@@ -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_resources_management",
|
|
10
|
+
sources=["py.Windows.ApplicationModel.Resources.Management.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,51 @@
|
|
|
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.foundation
|
|
13
|
+
import winrt.windows.foundation.collections
|
|
14
|
+
|
|
15
|
+
from winrt.windows.applicationmodel.resources.management import IndexedResourceType
|
|
16
|
+
|
|
17
|
+
Self = typing.TypeVar('Self')
|
|
18
|
+
|
|
19
|
+
class IndexedResourceCandidate(winrt.system.Object):
|
|
20
|
+
@staticmethod
|
|
21
|
+
def _from(obj: winrt.system.Object, /) -> IndexedResourceCandidate: ...
|
|
22
|
+
def get_qualifier_value(self, qualifier_name: str, /) -> str: ...
|
|
23
|
+
@_property
|
|
24
|
+
def metadata(self) -> typing.Optional[winrt.windows.foundation.collections.IMapView[str, str]]: ...
|
|
25
|
+
@_property
|
|
26
|
+
def qualifiers(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[IndexedResourceQualifier]]: ...
|
|
27
|
+
@_property
|
|
28
|
+
def type(self) -> IndexedResourceType: ...
|
|
29
|
+
@_property
|
|
30
|
+
def uri(self) -> typing.Optional[winrt.windows.foundation.Uri]: ...
|
|
31
|
+
@_property
|
|
32
|
+
def value_as_string(self) -> str: ...
|
|
33
|
+
|
|
34
|
+
class IndexedResourceQualifier(winrt.system.Object):
|
|
35
|
+
@staticmethod
|
|
36
|
+
def _from(obj: winrt.system.Object, /) -> IndexedResourceQualifier: ...
|
|
37
|
+
@_property
|
|
38
|
+
def qualifier_name(self) -> str: ...
|
|
39
|
+
@_property
|
|
40
|
+
def qualifier_value(self) -> str: ...
|
|
41
|
+
|
|
42
|
+
class ResourceIndexer(winrt.system.Object):
|
|
43
|
+
@staticmethod
|
|
44
|
+
def _from(obj: winrt.system.Object, /) -> ResourceIndexer: ...
|
|
45
|
+
@typing.overload
|
|
46
|
+
def __new__(cls: typing.Type[ResourceIndexer], project_root: typing.Optional[winrt.windows.foundation.Uri], extension_dll_path: typing.Optional[winrt.windows.foundation.Uri]) -> ResourceIndexer:...
|
|
47
|
+
@typing.overload
|
|
48
|
+
def __new__(cls: typing.Type[ResourceIndexer], project_root: typing.Optional[winrt.windows.foundation.Uri]) -> ResourceIndexer:...
|
|
49
|
+
def index_file_contents_async(self, file: typing.Optional[winrt.windows.foundation.Uri], /) -> winrt.windows.foundation.IAsyncOperation[winrt.windows.foundation.collections.IVectorView[IndexedResourceCandidate]]: ...
|
|
50
|
+
def index_file_path(self, file_path: typing.Optional[winrt.windows.foundation.Uri], /) -> typing.Optional[IndexedResourceCandidate]: ...
|
|
51
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
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_resources_management
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"IndexedResourceType",
|
|
10
|
+
"IndexedResourceCandidate",
|
|
11
|
+
"IndexedResourceQualifier",
|
|
12
|
+
"ResourceIndexer",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
class IndexedResourceType(enum.IntEnum):
|
|
16
|
+
STRING = 0
|
|
17
|
+
PATH = 1
|
|
18
|
+
EMBEDDED_DATA = 2
|
|
19
|
+
|
|
20
|
+
IndexedResourceCandidate = _winrt_windows_applicationmodel_resources_management.IndexedResourceCandidate
|
|
21
|
+
IndexedResourceQualifier = _winrt_windows_applicationmodel_resources_management.IndexedResourceQualifier
|
|
22
|
+
ResourceIndexer = _winrt_windows_applicationmodel_resources_management.ResourceIndexer
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: winrt-Windows.ApplicationModel.Resources.Management
|
|
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.Resources.Management
|
|
19
|
+
|
|
20
|
+
Windows Runtime (WinRT) APIs for for the `Windows.ApplicationModel.Resources.Management` namespace.
|
|
21
|
+
|
|
22
|
+
This package provides the `winrt.windows.applicationmodel.resources.management` module.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
all-requirements.txt
|
|
3
|
+
py.Windows.ApplicationModel.Resources.Management.cpp
|
|
4
|
+
pyproject.toml
|
|
5
|
+
pywinrt-version.txt
|
|
6
|
+
requirements.txt
|
|
7
|
+
setup.py
|
|
8
|
+
winrt/_winrt_windows_applicationmodel_resources_management.pyi
|
|
9
|
+
winrt/windows/applicationmodel/resources/management/__init__.py
|
|
10
|
+
winrt_Windows.ApplicationModel.Resources.Management.egg-info/PKG-INFO
|
|
11
|
+
winrt_Windows.ApplicationModel.Resources.Management.egg-info/SOURCES.txt
|
|
12
|
+
winrt_Windows.ApplicationModel.Resources.Management.egg-info/dependency_links.txt
|
|
13
|
+
winrt_Windows.ApplicationModel.Resources.Management.egg-info/requires.txt
|
|
14
|
+
winrt_Windows.ApplicationModel.Resources.Management.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|