winrt-Windows.Graphics.DirectX.Direct3D11 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.Graphics.DirectX.Direct3D11-2.0.0b1/PKG-INFO +22 -0
  2. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/README.md +7 -0
  3. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/all-requirements.txt +3 -0
  4. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/py.Windows.Graphics.DirectX.Direct3D11.cpp +761 -0
  5. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/pyproject.toml +43 -0
  6. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/pywinrt-version.txt +1 -0
  7. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/requirements.txt +3 -0
  8. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/setup.cfg +4 -0
  9. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/setup.py +17 -0
  10. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt/_winrt_windows_graphics_directx_direct3d11.pyi +46 -0
  11. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt/windows/graphics/directx/direct3d11/__init__.py +38 -0
  12. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/PKG-INFO +22 -0
  13. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/SOURCES.txt +14 -0
  14. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/dependency_links.txt +1 -0
  15. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/requires.txt +4 -0
  16. winrt-Windows.Graphics.DirectX.Direct3D11-2.0.0b1/winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/top_level.txt +1 -0
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Graphics.DirectX.Direct3D11
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.Graphics.DirectX.Direct3D11
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Graphics.DirectX.Direct3D11` namespace.
21
+
22
+ This package provides the `winrt.windows.graphics.directx.direct3d11` module.
@@ -0,0 +1,7 @@
1
+ <!-- warning: Please don't edit this file. It was automatically generated. -->
2
+
3
+ # winrt-Windows.Graphics.DirectX.Direct3D11
4
+
5
+ Windows Runtime (WinRT) APIs for for the `Windows.Graphics.DirectX.Direct3D11` namespace.
6
+
7
+ This package provides the `winrt.windows.graphics.directx.direct3d11` module.
@@ -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-Windows.Graphics.DirectX[all]==2.0.0-beta.1
@@ -0,0 +1,761 @@
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.0-beta.1
2
+
3
+ #include "py.Windows.Graphics.DirectX.Direct3D11.h"
4
+
5
+
6
+ namespace py::cpp::Windows::Graphics::DirectX::Direct3D11
7
+ {
8
+ // ----- IDirect3DDevice interface --------------------
9
+
10
+ static PyObject* _new_IDirect3DDevice(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
11
+ {
12
+ static_assert(py::py_type<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice>::type_name);
13
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice>::type_name);
14
+ return nullptr;
15
+ }
16
+
17
+ static void _dealloc_IDirect3DDevice(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice* 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* IDirect3DDevice_Close(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice* self, PyObject* args) noexcept
26
+ {
27
+ auto arg_count = PyTuple_Size(args);
28
+
29
+ if (arg_count == 0)
30
+ {
31
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IClosable", L"Close", 0))
32
+ {
33
+ py::set_arg_count_version_error(0);
34
+ return nullptr;
35
+ }
36
+
37
+ try
38
+ {
39
+ self->obj.Close();
40
+ Py_RETURN_NONE;
41
+ }
42
+ catch (...)
43
+ {
44
+ py::to_PyErr();
45
+ return nullptr;
46
+ }
47
+ }
48
+ else
49
+ {
50
+ py::set_invalid_arg_count_error(arg_count);
51
+ return nullptr;
52
+ }
53
+ }
54
+
55
+ static PyObject* IDirect3DDevice_Trim(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice* self, PyObject* args) noexcept
56
+ {
57
+ auto arg_count = PyTuple_Size(args);
58
+
59
+ if (arg_count == 0)
60
+ {
61
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Graphics.DirectX.Direct3D11.IDirect3DDevice", L"Trim", 0))
62
+ {
63
+ py::set_arg_count_version_error(0);
64
+ return nullptr;
65
+ }
66
+
67
+ try
68
+ {
69
+ self->obj.Trim();
70
+ Py_RETURN_NONE;
71
+ }
72
+ catch (...)
73
+ {
74
+ py::to_PyErr();
75
+ return nullptr;
76
+ }
77
+ }
78
+ else
79
+ {
80
+ py::set_invalid_arg_count_error(arg_count);
81
+ return nullptr;
82
+ }
83
+ }
84
+
85
+ static PyObject* _assign_array_IDirect3DDevice(PyObject* /*unused*/, PyObject* arg) noexcept
86
+ {
87
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice>>();
88
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
89
+ {
90
+ return nullptr;
91
+ }
92
+ Py_RETURN_NONE;
93
+ }
94
+
95
+ static PyObject* _from_IDirect3DDevice(PyObject* /*unused*/, PyObject* arg) noexcept
96
+ {
97
+ try
98
+ {
99
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
100
+ return py::convert(return_value.as<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice>());
101
+ }
102
+ catch (...)
103
+ {
104
+ py::to_PyErr();
105
+ return nullptr;
106
+ }
107
+ }
108
+
109
+ static PyObject* _enter_IDirect3DDevice(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice* self, PyObject* /*unused*/) noexcept
110
+ {
111
+ return Py_NewRef(self);
112
+ }
113
+
114
+ static PyObject* _exit_IDirect3DDevice(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice* self, PyObject* /*unused*/) noexcept
115
+ {
116
+ try
117
+ {
118
+ self->obj.Close();
119
+ Py_RETURN_FALSE;
120
+ }
121
+ catch (...)
122
+ {
123
+ py::to_PyErr();
124
+ return nullptr;
125
+ }
126
+ }
127
+
128
+ static PyMethodDef _methods_IDirect3DDevice[] = {
129
+ { "close", reinterpret_cast<PyCFunction>(IDirect3DDevice_Close), METH_VARARGS, nullptr },
130
+ { "trim", reinterpret_cast<PyCFunction>(IDirect3DDevice_Trim), METH_VARARGS, nullptr },
131
+ { "_assign_array_", _assign_array_IDirect3DDevice, METH_O | METH_STATIC, nullptr },
132
+ { "_from", reinterpret_cast<PyCFunction>(_from_IDirect3DDevice), METH_O | METH_STATIC, nullptr },
133
+ { "__enter__", reinterpret_cast<PyCFunction>(_enter_IDirect3DDevice), METH_NOARGS, nullptr },
134
+ { "__exit__", reinterpret_cast<PyCFunction>(_exit_IDirect3DDevice), METH_VARARGS, nullptr },
135
+ { }
136
+ };
137
+
138
+ static PyGetSetDef _getset_IDirect3DDevice[] = {
139
+ { }
140
+ };
141
+
142
+ static PyType_Slot _type_slots_IDirect3DDevice[] =
143
+ {
144
+ { Py_tp_new, reinterpret_cast<void*>(_new_IDirect3DDevice) },
145
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IDirect3DDevice) },
146
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_IDirect3DDevice) },
147
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_IDirect3DDevice) },
148
+ { },
149
+ };
150
+
151
+ static PyType_Spec type_spec_IDirect3DDevice =
152
+ {
153
+ "winrt._winrt_windows_graphics_directx_direct3d11.IDirect3DDevice",
154
+ sizeof(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice),
155
+ 0,
156
+ Py_TPFLAGS_DEFAULT,
157
+ _type_slots_IDirect3DDevice
158
+ };
159
+
160
+ // ----- IDirect3DSurface interface --------------------
161
+
162
+ static PyObject* _new_IDirect3DSurface(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
163
+ {
164
+ static_assert(py::py_type<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface>::type_name);
165
+ py::set_invalid_activation_error(py::py_type<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface>::type_name);
166
+ return nullptr;
167
+ }
168
+
169
+ static void _dealloc_IDirect3DSurface(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface* self) noexcept
170
+ {
171
+ auto tp = Py_TYPE(self);
172
+ std::destroy_at(&self->obj);
173
+ tp->tp_free(self);
174
+ Py_DECREF(tp);
175
+ }
176
+
177
+ static PyObject* IDirect3DSurface_Close(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface* self, PyObject* args) noexcept
178
+ {
179
+ auto arg_count = PyTuple_Size(args);
180
+
181
+ if (arg_count == 0)
182
+ {
183
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.Foundation.IClosable", L"Close", 0))
184
+ {
185
+ py::set_arg_count_version_error(0);
186
+ return nullptr;
187
+ }
188
+
189
+ try
190
+ {
191
+ self->obj.Close();
192
+ Py_RETURN_NONE;
193
+ }
194
+ catch (...)
195
+ {
196
+ py::to_PyErr();
197
+ return nullptr;
198
+ }
199
+ }
200
+ else
201
+ {
202
+ py::set_invalid_arg_count_error(arg_count);
203
+ return nullptr;
204
+ }
205
+ }
206
+
207
+ static PyObject* IDirect3DSurface_get_Description(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface* self, void* /*unused*/) noexcept
208
+ {
209
+ if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface", L"Description"))
210
+ {
211
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
212
+ return nullptr;
213
+ }
214
+
215
+ try
216
+ {
217
+ return py::convert(self->obj.Description());
218
+ }
219
+ catch (...)
220
+ {
221
+ py::to_PyErr();
222
+ return nullptr;
223
+ }
224
+ }
225
+
226
+ static PyObject* _assign_array_IDirect3DSurface(PyObject* /*unused*/, PyObject* arg) noexcept
227
+ {
228
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface>>();
229
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
230
+ {
231
+ return nullptr;
232
+ }
233
+ Py_RETURN_NONE;
234
+ }
235
+
236
+ static PyObject* _from_IDirect3DSurface(PyObject* /*unused*/, PyObject* arg) noexcept
237
+ {
238
+ try
239
+ {
240
+ auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
241
+ return py::convert(return_value.as<winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface>());
242
+ }
243
+ catch (...)
244
+ {
245
+ py::to_PyErr();
246
+ return nullptr;
247
+ }
248
+ }
249
+
250
+ static PyObject* _enter_IDirect3DSurface(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface* self, PyObject* /*unused*/) noexcept
251
+ {
252
+ return Py_NewRef(self);
253
+ }
254
+
255
+ static PyObject* _exit_IDirect3DSurface(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface* self, PyObject* /*unused*/) noexcept
256
+ {
257
+ try
258
+ {
259
+ self->obj.Close();
260
+ Py_RETURN_FALSE;
261
+ }
262
+ catch (...)
263
+ {
264
+ py::to_PyErr();
265
+ return nullptr;
266
+ }
267
+ }
268
+
269
+ static PyMethodDef _methods_IDirect3DSurface[] = {
270
+ { "close", reinterpret_cast<PyCFunction>(IDirect3DSurface_Close), METH_VARARGS, nullptr },
271
+ { "_assign_array_", _assign_array_IDirect3DSurface, METH_O | METH_STATIC, nullptr },
272
+ { "_from", reinterpret_cast<PyCFunction>(_from_IDirect3DSurface), METH_O | METH_STATIC, nullptr },
273
+ { "__enter__", reinterpret_cast<PyCFunction>(_enter_IDirect3DSurface), METH_NOARGS, nullptr },
274
+ { "__exit__", reinterpret_cast<PyCFunction>(_exit_IDirect3DSurface), METH_VARARGS, nullptr },
275
+ { }
276
+ };
277
+
278
+ static PyGetSetDef _getset_IDirect3DSurface[] = {
279
+ { "description", reinterpret_cast<getter>(IDirect3DSurface_get_Description), nullptr, nullptr, nullptr },
280
+ { }
281
+ };
282
+
283
+ static PyType_Slot _type_slots_IDirect3DSurface[] =
284
+ {
285
+ { Py_tp_new, reinterpret_cast<void*>(_new_IDirect3DSurface) },
286
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_IDirect3DSurface) },
287
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_IDirect3DSurface) },
288
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_IDirect3DSurface) },
289
+ { },
290
+ };
291
+
292
+ static PyType_Spec type_spec_IDirect3DSurface =
293
+ {
294
+ "winrt._winrt_windows_graphics_directx_direct3d11.IDirect3DSurface",
295
+ sizeof(py::wrapper::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface),
296
+ 0,
297
+ Py_TPFLAGS_DEFAULT,
298
+ _type_slots_IDirect3DSurface
299
+ };
300
+
301
+ // ----- Direct3DMultisampleDescription struct --------------------
302
+
303
+ winrt_struct_wrapper<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription>* _new_Direct3DMultisampleDescription(PyTypeObject* subclass, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
304
+ {
305
+ auto self = reinterpret_cast<winrt_struct_wrapper<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription>*>(subclass->tp_alloc(subclass, 0));
306
+
307
+ if (!self)
308
+ {
309
+ return nullptr;
310
+ }
311
+
312
+ std::construct_at(&self->obj);
313
+
314
+ return self;
315
+ }
316
+
317
+ int _init_Direct3DMultisampleDescription(winrt_struct_wrapper<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription>* self, PyObject* args, PyObject* kwds) noexcept
318
+ {
319
+ auto tuple_size = PyTuple_Size(args);
320
+
321
+ if ((tuple_size == 0) && (kwds == nullptr))
322
+ {
323
+ self->obj = {};
324
+ return 0;
325
+ }
326
+
327
+ int32_t _Count{};
328
+ int32_t _Quality{};
329
+
330
+ static const char* kwlist[] = {"count", "quality", nullptr};
331
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii", const_cast<char**>(kwlist), &_Count, &_Quality))
332
+ {
333
+ return -1;
334
+ }
335
+
336
+ try
337
+ {
338
+ self->obj = {_Count, _Quality};
339
+ return 0;
340
+ }
341
+ catch (...)
342
+ {
343
+ py::to_PyErr();
344
+ return -1;
345
+ }
346
+ }
347
+
348
+ static void _dealloc_Direct3DMultisampleDescription(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription* self) noexcept
349
+ {
350
+ auto tp = Py_TYPE(self);
351
+ std::destroy_at(&self->obj);
352
+ tp->tp_free(self);
353
+ Py_DECREF(tp);
354
+ }
355
+
356
+ static PyObject* _assign_array_Direct3DMultisampleDescription(PyObject* /*unused*/, PyObject* arg) noexcept
357
+ {
358
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription>>();
359
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
360
+ {
361
+ return nullptr;
362
+ }
363
+ Py_RETURN_NONE;
364
+ }
365
+
366
+ static PyMethodDef _methods_Direct3DMultisampleDescription[] = {
367
+ { "_assign_array_", _assign_array_Direct3DMultisampleDescription, METH_O | METH_STATIC, nullptr },
368
+ { }
369
+ };
370
+
371
+ static PyObject* Direct3DMultisampleDescription_get_Count(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription* self, void* /*unused*/) noexcept
372
+ {
373
+ try
374
+ {
375
+ return py::convert(self->obj.Count);
376
+ }
377
+ catch (...)
378
+ {
379
+ py::to_PyErr();
380
+ return nullptr;
381
+ }
382
+ }
383
+
384
+ static int Direct3DMultisampleDescription_set_Count(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription* self, PyObject* arg, void* /*unused*/) noexcept
385
+ {
386
+ if (arg == nullptr)
387
+ {
388
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
389
+ return -1;
390
+ }
391
+
392
+ try
393
+ {
394
+ self->obj.Count = py::converter<int32_t>::convert_to(arg);
395
+ return 0;
396
+ }
397
+ catch (...)
398
+ {
399
+ py::to_PyErr();
400
+ return -1;
401
+ }
402
+ }
403
+
404
+ static PyObject* Direct3DMultisampleDescription_get_Quality(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription* self, void* /*unused*/) noexcept
405
+ {
406
+ try
407
+ {
408
+ return py::convert(self->obj.Quality);
409
+ }
410
+ catch (...)
411
+ {
412
+ py::to_PyErr();
413
+ return nullptr;
414
+ }
415
+ }
416
+
417
+ static int Direct3DMultisampleDescription_set_Quality(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription* self, PyObject* arg, void* /*unused*/) noexcept
418
+ {
419
+ if (arg == nullptr)
420
+ {
421
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
422
+ return -1;
423
+ }
424
+
425
+ try
426
+ {
427
+ self->obj.Quality = py::converter<int32_t>::convert_to(arg);
428
+ return 0;
429
+ }
430
+ catch (...)
431
+ {
432
+ py::to_PyErr();
433
+ return -1;
434
+ }
435
+ }
436
+
437
+ static PyGetSetDef _getset_Direct3DMultisampleDescription[] = {
438
+ { "count", reinterpret_cast<getter>(Direct3DMultisampleDescription_get_Count), reinterpret_cast<setter>(Direct3DMultisampleDescription_set_Count), nullptr, nullptr },
439
+ { "quality", reinterpret_cast<getter>(Direct3DMultisampleDescription_get_Quality), reinterpret_cast<setter>(Direct3DMultisampleDescription_set_Quality), nullptr, nullptr },
440
+ { }
441
+ };
442
+
443
+ static PyType_Slot _type_slots_Direct3DMultisampleDescription[] =
444
+ {
445
+ { Py_tp_new, reinterpret_cast<void*>(_new_Direct3DMultisampleDescription) },
446
+ { Py_tp_init, reinterpret_cast<void*>(_init_Direct3DMultisampleDescription) },
447
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Direct3DMultisampleDescription) },
448
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_Direct3DMultisampleDescription) },
449
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_Direct3DMultisampleDescription) },
450
+ { },
451
+ };
452
+
453
+ static PyType_Spec type_spec_Direct3DMultisampleDescription =
454
+ {
455
+ "winrt._winrt_windows_graphics_directx_direct3d11.Direct3DMultisampleDescription",
456
+ sizeof(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription),
457
+ 0,
458
+ Py_TPFLAGS_DEFAULT,
459
+ _type_slots_Direct3DMultisampleDescription
460
+ };
461
+
462
+ // ----- Direct3DSurfaceDescription struct --------------------
463
+
464
+ winrt_struct_wrapper<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription>* _new_Direct3DSurfaceDescription(PyTypeObject* subclass, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
465
+ {
466
+ auto self = reinterpret_cast<winrt_struct_wrapper<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription>*>(subclass->tp_alloc(subclass, 0));
467
+
468
+ if (!self)
469
+ {
470
+ return nullptr;
471
+ }
472
+
473
+ std::construct_at(&self->obj);
474
+
475
+ return self;
476
+ }
477
+
478
+ int _init_Direct3DSurfaceDescription(winrt_struct_wrapper<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription>* self, PyObject* args, PyObject* kwds) noexcept
479
+ {
480
+ auto tuple_size = PyTuple_Size(args);
481
+
482
+ if ((tuple_size == 0) && (kwds == nullptr))
483
+ {
484
+ self->obj = {};
485
+ return 0;
486
+ }
487
+
488
+ int32_t _Width{};
489
+ int32_t _Height{};
490
+ int32_t _Format{};
491
+ PyObject* _MultisampleDescription{};
492
+
493
+ static const char* kwlist[] = {"width", "height", "format", "multisample_description", nullptr};
494
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "iiiO", const_cast<char**>(kwlist), &_Width, &_Height, &_Format, &_MultisampleDescription))
495
+ {
496
+ return -1;
497
+ }
498
+
499
+ try
500
+ {
501
+ self->obj = {_Width, _Height, static_cast<winrt::Windows::Graphics::DirectX::DirectXPixelFormat>(_Format), py::converter<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription>::convert_to(_MultisampleDescription)};
502
+ return 0;
503
+ }
504
+ catch (...)
505
+ {
506
+ py::to_PyErr();
507
+ return -1;
508
+ }
509
+ }
510
+
511
+ static void _dealloc_Direct3DSurfaceDescription(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self) noexcept
512
+ {
513
+ auto tp = Py_TYPE(self);
514
+ std::destroy_at(&self->obj);
515
+ tp->tp_free(self);
516
+ Py_DECREF(tp);
517
+ }
518
+
519
+ static PyObject* _assign_array_Direct3DSurfaceDescription(PyObject* /*unused*/, PyObject* arg) noexcept
520
+ {
521
+ auto array = std::make_unique<py::ComArray<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription>>();
522
+ if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
523
+ {
524
+ return nullptr;
525
+ }
526
+ Py_RETURN_NONE;
527
+ }
528
+
529
+ static PyMethodDef _methods_Direct3DSurfaceDescription[] = {
530
+ { "_assign_array_", _assign_array_Direct3DSurfaceDescription, METH_O | METH_STATIC, nullptr },
531
+ { }
532
+ };
533
+
534
+ static PyObject* Direct3DSurfaceDescription_get_Width(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, void* /*unused*/) noexcept
535
+ {
536
+ try
537
+ {
538
+ return py::convert(self->obj.Width);
539
+ }
540
+ catch (...)
541
+ {
542
+ py::to_PyErr();
543
+ return nullptr;
544
+ }
545
+ }
546
+
547
+ static int Direct3DSurfaceDescription_set_Width(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, PyObject* arg, void* /*unused*/) noexcept
548
+ {
549
+ if (arg == nullptr)
550
+ {
551
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
552
+ return -1;
553
+ }
554
+
555
+ try
556
+ {
557
+ self->obj.Width = py::converter<int32_t>::convert_to(arg);
558
+ return 0;
559
+ }
560
+ catch (...)
561
+ {
562
+ py::to_PyErr();
563
+ return -1;
564
+ }
565
+ }
566
+
567
+ static PyObject* Direct3DSurfaceDescription_get_Height(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, void* /*unused*/) noexcept
568
+ {
569
+ try
570
+ {
571
+ return py::convert(self->obj.Height);
572
+ }
573
+ catch (...)
574
+ {
575
+ py::to_PyErr();
576
+ return nullptr;
577
+ }
578
+ }
579
+
580
+ static int Direct3DSurfaceDescription_set_Height(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, PyObject* arg, void* /*unused*/) noexcept
581
+ {
582
+ if (arg == nullptr)
583
+ {
584
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
585
+ return -1;
586
+ }
587
+
588
+ try
589
+ {
590
+ self->obj.Height = py::converter<int32_t>::convert_to(arg);
591
+ return 0;
592
+ }
593
+ catch (...)
594
+ {
595
+ py::to_PyErr();
596
+ return -1;
597
+ }
598
+ }
599
+
600
+ static PyObject* Direct3DSurfaceDescription_get_Format(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, void* /*unused*/) noexcept
601
+ {
602
+ try
603
+ {
604
+ return py::convert(self->obj.Format);
605
+ }
606
+ catch (...)
607
+ {
608
+ py::to_PyErr();
609
+ return nullptr;
610
+ }
611
+ }
612
+
613
+ static int Direct3DSurfaceDescription_set_Format(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, PyObject* arg, void* /*unused*/) noexcept
614
+ {
615
+ if (arg == nullptr)
616
+ {
617
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
618
+ return -1;
619
+ }
620
+
621
+ try
622
+ {
623
+ self->obj.Format = py::converter<winrt::Windows::Graphics::DirectX::DirectXPixelFormat>::convert_to(arg);
624
+ return 0;
625
+ }
626
+ catch (...)
627
+ {
628
+ py::to_PyErr();
629
+ return -1;
630
+ }
631
+ }
632
+
633
+ static PyObject* Direct3DSurfaceDescription_get_MultisampleDescription(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, void* /*unused*/) noexcept
634
+ {
635
+ try
636
+ {
637
+ return py::convert(self->obj.MultisampleDescription);
638
+ }
639
+ catch (...)
640
+ {
641
+ py::to_PyErr();
642
+ return nullptr;
643
+ }
644
+ }
645
+
646
+ static int Direct3DSurfaceDescription_set_MultisampleDescription(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription* self, PyObject* arg, void* /*unused*/) noexcept
647
+ {
648
+ if (arg == nullptr)
649
+ {
650
+ PyErr_SetString(PyExc_AttributeError, "can't delete attribute");
651
+ return -1;
652
+ }
653
+
654
+ try
655
+ {
656
+ self->obj.MultisampleDescription = py::converter<winrt::Windows::Graphics::DirectX::Direct3D11::Direct3DMultisampleDescription>::convert_to(arg);
657
+ return 0;
658
+ }
659
+ catch (...)
660
+ {
661
+ py::to_PyErr();
662
+ return -1;
663
+ }
664
+ }
665
+
666
+ static PyGetSetDef _getset_Direct3DSurfaceDescription[] = {
667
+ { "width", reinterpret_cast<getter>(Direct3DSurfaceDescription_get_Width), reinterpret_cast<setter>(Direct3DSurfaceDescription_set_Width), nullptr, nullptr },
668
+ { "height", reinterpret_cast<getter>(Direct3DSurfaceDescription_get_Height), reinterpret_cast<setter>(Direct3DSurfaceDescription_set_Height), nullptr, nullptr },
669
+ { "format", reinterpret_cast<getter>(Direct3DSurfaceDescription_get_Format), reinterpret_cast<setter>(Direct3DSurfaceDescription_set_Format), nullptr, nullptr },
670
+ { "multisample_description", reinterpret_cast<getter>(Direct3DSurfaceDescription_get_MultisampleDescription), reinterpret_cast<setter>(Direct3DSurfaceDescription_set_MultisampleDescription), nullptr, nullptr },
671
+ { }
672
+ };
673
+
674
+ static PyType_Slot _type_slots_Direct3DSurfaceDescription[] =
675
+ {
676
+ { Py_tp_new, reinterpret_cast<void*>(_new_Direct3DSurfaceDescription) },
677
+ { Py_tp_init, reinterpret_cast<void*>(_init_Direct3DSurfaceDescription) },
678
+ { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_Direct3DSurfaceDescription) },
679
+ { Py_tp_methods, reinterpret_cast<void*>(_methods_Direct3DSurfaceDescription) },
680
+ { Py_tp_getset, reinterpret_cast<void*>(_getset_Direct3DSurfaceDescription) },
681
+ { },
682
+ };
683
+
684
+ static PyType_Spec type_spec_Direct3DSurfaceDescription =
685
+ {
686
+ "winrt._winrt_windows_graphics_directx_direct3d11.Direct3DSurfaceDescription",
687
+ sizeof(py::wrapper::Windows::Graphics::DirectX::Direct3D11::Direct3DSurfaceDescription),
688
+ 0,
689
+ Py_TPFLAGS_DEFAULT,
690
+ _type_slots_Direct3DSurfaceDescription
691
+ };
692
+
693
+ // ----- Windows.Graphics.DirectX.Direct3D11 Initialization --------------------
694
+ PyDoc_STRVAR(module_doc, "Windows::Graphics::DirectX::Direct3D11");
695
+
696
+
697
+ static PyModuleDef module_def
698
+ = {PyModuleDef_HEAD_INIT,
699
+ "_winrt_windows_graphics_directx_direct3d11",
700
+ module_doc,
701
+ 0,
702
+ nullptr,
703
+ nullptr,
704
+ nullptr,
705
+ nullptr,
706
+ nullptr};
707
+
708
+ } // py::cpp::Windows::Graphics::DirectX::Direct3D11
709
+
710
+ PyMODINIT_FUNC PyInit__winrt_windows_graphics_directx_direct3d11(void) noexcept
711
+ {
712
+ using namespace py::cpp::Windows::Graphics::DirectX::Direct3D11;
713
+
714
+ if (py::import_winrt_runtime() == -1)
715
+ {
716
+ return nullptr;
717
+ }
718
+
719
+ py::pyobj_handle module{PyModule_Create(&module_def)};
720
+
721
+ if (!module)
722
+ {
723
+ return nullptr;
724
+ }
725
+
726
+ auto object_type = py::get_object_type();
727
+ if (!object_type)
728
+ {
729
+ return nullptr;
730
+ }
731
+
732
+ py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
733
+
734
+ if (!object_bases)
735
+ {
736
+ return nullptr;
737
+ }
738
+
739
+ if (py::register_python_type(module.get(), &type_spec_IDirect3DDevice, object_bases.get(), nullptr) == -1)
740
+ {
741
+ return nullptr;
742
+ }
743
+
744
+ if (py::register_python_type(module.get(), &type_spec_IDirect3DSurface, object_bases.get(), nullptr) == -1)
745
+ {
746
+ return nullptr;
747
+ }
748
+
749
+ if (py::register_python_type(module.get(), &type_spec_Direct3DMultisampleDescription, nullptr, nullptr) == -1)
750
+ {
751
+ return nullptr;
752
+ }
753
+
754
+ if (py::register_python_type(module.get(), &type_spec_Direct3DSurfaceDescription, nullptr, nullptr) == -1)
755
+ {
756
+ return nullptr;
757
+ }
758
+
759
+
760
+ return module.detach();
761
+ }
@@ -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.Graphics.DirectX.Direct3D11"
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_graphics_directx_direct3d11",
10
+ sources=["py.Windows.Graphics.DirectX.Direct3D11.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,46 @@
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.graphics.directx
13
+
14
+ from winrt.windows.graphics.directx.direct3d11 import Direct3DBindings, Direct3DUsage
15
+
16
+ Self = typing.TypeVar('Self')
17
+
18
+ class Direct3DMultisampleDescription:
19
+ count: winrt.system.Int32
20
+ quality: winrt.system.Int32
21
+ def __init__(self, count: winrt.system.Int32, quality: winrt.system.Int32) -> None: ...
22
+
23
+ class Direct3DSurfaceDescription:
24
+ width: winrt.system.Int32
25
+ height: winrt.system.Int32
26
+ format: winrt.windows.graphics.directx.DirectXPixelFormat
27
+ multisample_description: Direct3DMultisampleDescription
28
+ def __init__(self, width: winrt.system.Int32, height: winrt.system.Int32, format: winrt.windows.graphics.directx.DirectXPixelFormat, multisample_description: Direct3DMultisampleDescription) -> None: ...
29
+
30
+ class IDirect3DDevice(winrt.system.Object):
31
+ def __enter__(self: Self) -> Self: ...
32
+ def __exit__(self, *args) -> None: ...
33
+ @staticmethod
34
+ def _from(obj: winrt.system.Object, /) -> IDirect3DDevice: ...
35
+ def close(self) -> None: ...
36
+ def trim(self) -> None: ...
37
+
38
+ class IDirect3DSurface(winrt.system.Object):
39
+ def __enter__(self: Self) -> Self: ...
40
+ def __exit__(self, *args) -> None: ...
41
+ @staticmethod
42
+ def _from(obj: winrt.system.Object, /) -> IDirect3DSurface: ...
43
+ def close(self) -> None: ...
44
+ @_property
45
+ def description(self) -> Direct3DSurfaceDescription: ...
46
+
@@ -0,0 +1,38 @@
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_graphics_directx_direct3d11
7
+
8
+ __all__ = [
9
+ "Direct3DBindings",
10
+ "Direct3DUsage",
11
+ "Direct3DMultisampleDescription",
12
+ "Direct3DSurfaceDescription",
13
+ "IDirect3DDevice",
14
+ "IDirect3DSurface",
15
+ ]
16
+
17
+ class Direct3DBindings(enum.IntFlag):
18
+ VERTEX_BUFFER = 0x1
19
+ INDEX_BUFFER = 0x2
20
+ CONSTANT_BUFFER = 0x4
21
+ SHADER_RESOURCE = 0x8
22
+ STREAM_OUTPUT = 0x10
23
+ RENDER_TARGET = 0x20
24
+ DEPTH_STENCIL = 0x40
25
+ UNORDERED_ACCESS = 0x80
26
+ DECODER = 0x200
27
+ VIDEO_ENCODER = 0x400
28
+
29
+ class Direct3DUsage(enum.IntEnum):
30
+ DEFAULT = 0
31
+ IMMUTABLE = 1
32
+ DYNAMIC = 2
33
+ STAGING = 3
34
+
35
+ Direct3DMultisampleDescription = _winrt_windows_graphics_directx_direct3d11.Direct3DMultisampleDescription
36
+ Direct3DSurfaceDescription = _winrt_windows_graphics_directx_direct3d11.Direct3DSurfaceDescription
37
+ IDirect3DDevice = _winrt_windows_graphics_directx_direct3d11.IDirect3DDevice
38
+ IDirect3DSurface = _winrt_windows_graphics_directx_direct3d11.IDirect3DSurface
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.1
2
+ Name: winrt-Windows.Graphics.DirectX.Direct3D11
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.Graphics.DirectX.Direct3D11
19
+
20
+ Windows Runtime (WinRT) APIs for for the `Windows.Graphics.DirectX.Direct3D11` namespace.
21
+
22
+ This package provides the `winrt.windows.graphics.directx.direct3d11` module.
@@ -0,0 +1,14 @@
1
+ README.md
2
+ all-requirements.txt
3
+ py.Windows.Graphics.DirectX.Direct3D11.cpp
4
+ pyproject.toml
5
+ pywinrt-version.txt
6
+ requirements.txt
7
+ setup.py
8
+ winrt/_winrt_windows_graphics_directx_direct3d11.pyi
9
+ winrt/windows/graphics/directx/direct3d11/__init__.py
10
+ winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/PKG-INFO
11
+ winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/SOURCES.txt
12
+ winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/dependency_links.txt
13
+ winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/requires.txt
14
+ winrt_Windows.Graphics.DirectX.Direct3D11.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.0.0-beta.1
2
+
3
+ [all]
4
+ winrt-Windows.Graphics.DirectX[all]==2.0.0-beta.1