winrt-Windows.System.Display 2.0.1__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/PKG-INFO +3 -3
  2. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/py.Windows.System.Display.cpp +45 -35
  3. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/pyproject.toml +3 -2
  4. winrt_windows_system_display-2.2.0/pywinrt-version.txt +1 -0
  5. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/requirements.txt +2 -2
  6. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt/_winrt_windows_system_display.pyi +2 -2
  7. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt/windows/system/display/__init__.py +1 -1
  8. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt_Windows.System.Display.egg-info/PKG-INFO +3 -3
  9. winrt_windows_system_display-2.2.0/winrt_Windows.System.Display.egg-info/requires.txt +1 -0
  10. winrt_windows_system_display-2.0.1/pywinrt-version.txt +0 -1
  11. winrt_windows_system_display-2.0.1/winrt_Windows.System.Display.egg-info/requires.txt +0 -1
  12. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/README.md +0 -0
  13. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/setup.cfg +0 -0
  14. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/setup.py +0 -0
  15. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt/windows/system/display/py.typed +0 -0
  16. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt_Windows.System.Display.egg-info/SOURCES.txt +0 -0
  17. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt_Windows.System.Display.egg-info/dependency_links.txt +0 -0
  18. {winrt_windows_system_display-2.0.1 → winrt_windows_system_display-2.2.0}/winrt_Windows.System.Display.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Display
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,9 +10,9 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
 
17
17
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
18
 
@@ -1,8 +1,7 @@
1
- // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ // WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  #include "py.Windows.System.Display.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::System::Display
7
6
  {
8
7
  // ----- DisplayRequest class --------------------
@@ -20,7 +19,7 @@ namespace py::cpp::Windows::System::Display
20
19
  {
21
20
  try
22
21
  {
23
- winrt::Windows::System::Display::DisplayRequest instance{ };
22
+ winrt::Windows::System::Display::DisplayRequest instance{};
24
23
  return py::wrap(instance, type);
25
24
  }
26
25
  catch (...)
@@ -50,14 +49,21 @@ namespace py::cpp::Windows::System::Display
50
49
 
51
50
  if (arg_count == 0)
52
51
  {
53
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Display.DisplayRequest", L"RequestActive", 0))
54
- {
55
- py::set_arg_count_version_error(0);
56
- return nullptr;
57
- }
58
-
59
52
  try
60
53
  {
54
+ static std::optional<bool> is_overload_present{};
55
+
56
+ if (!is_overload_present.has_value())
57
+ {
58
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Display.DisplayRequest", L"RequestActive", 0);
59
+ }
60
+
61
+ if (!is_overload_present.value())
62
+ {
63
+ py::set_arg_count_version_error(0);
64
+ return nullptr;
65
+ }
66
+
61
67
  self->obj.RequestActive();
62
68
  Py_RETURN_NONE;
63
69
  }
@@ -80,14 +86,21 @@ namespace py::cpp::Windows::System::Display
80
86
 
81
87
  if (arg_count == 0)
82
88
  {
83
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Display.DisplayRequest", L"RequestRelease", 0))
84
- {
85
- py::set_arg_count_version_error(0);
86
- return nullptr;
87
- }
88
-
89
89
  try
90
90
  {
91
+ static std::optional<bool> is_overload_present{};
92
+
93
+ if (!is_overload_present.has_value())
94
+ {
95
+ is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Display.DisplayRequest", L"RequestRelease", 0);
96
+ }
97
+
98
+ if (!is_overload_present.value())
99
+ {
100
+ py::set_arg_count_version_error(0);
101
+ return nullptr;
102
+ }
103
+
91
104
  self->obj.RequestRelease();
92
105
  Py_RETURN_NONE;
93
106
  }
@@ -140,39 +153,35 @@ namespace py::cpp::Windows::System::Display
140
153
  { }
141
154
  };
142
155
 
143
- static PyType_Slot _type_slots_DisplayRequest[] =
144
- {
156
+ static PyType_Slot _type_slots_DisplayRequest[] = {
145
157
  { Py_tp_new, reinterpret_cast<void*>(_new_DisplayRequest) },
146
158
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_DisplayRequest) },
147
159
  { Py_tp_methods, reinterpret_cast<void*>(_methods_DisplayRequest) },
148
160
  { Py_tp_getset, reinterpret_cast<void*>(_getset_DisplayRequest) },
149
- { },
161
+ { }
150
162
  };
151
163
 
152
- static PyType_Spec type_spec_DisplayRequest =
153
- {
164
+ static PyType_Spec type_spec_DisplayRequest = {
154
165
  "winrt._winrt_windows_system_display.DisplayRequest",
155
166
  sizeof(py::wrapper::Windows::System::Display::DisplayRequest),
156
167
  0,
157
168
  Py_TPFLAGS_DEFAULT,
158
- _type_slots_DisplayRequest
159
- };
169
+ _type_slots_DisplayRequest};
160
170
 
161
171
  // ----- Windows.System.Display Initialization --------------------
162
- PyDoc_STRVAR(module_doc, "Windows::System::Display");
163
172
 
173
+ PyDoc_STRVAR(module_doc, "Windows.System.Display");
164
174
 
165
- static PyModuleDef module_def
166
- = {PyModuleDef_HEAD_INIT,
167
- "_winrt_windows_system_display",
168
- module_doc,
169
- 0,
170
- nullptr,
171
- nullptr,
172
- nullptr,
173
- nullptr,
174
- nullptr};
175
-
175
+ static PyModuleDef module_def = {
176
+ PyModuleDef_HEAD_INIT,
177
+ "_winrt_windows_system_display",
178
+ module_doc,
179
+ 0,
180
+ nullptr,
181
+ nullptr,
182
+ nullptr,
183
+ nullptr,
184
+ nullptr};
176
185
  } // py::cpp::Windows::System::Display
177
186
 
178
187
  PyMODINIT_FUNC PyInit__winrt_windows_system_display(void) noexcept
@@ -204,7 +213,8 @@ PyMODINIT_FUNC PyInit__winrt_windows_system_display(void) noexcept
204
213
  return nullptr;
205
214
  }
206
215
 
207
- if (py::register_python_type(module.get(), &type_spec_DisplayRequest, object_bases.get(), nullptr) == -1)
216
+ py::pytype_handle DisplayRequest_type{py::register_python_type(module.get(), &type_spec_DisplayRequest, object_bases.get(), nullptr)};
217
+ if (!DisplayRequest_type)
208
218
  {
209
219
  return nullptr;
210
220
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies"]
19
- requires-python = ">=3.9,<3.13"
19
+ requires-python = ">=3.9,<3.14"
20
20
 
21
21
  [project.urls]
22
22
  # Homepage = "https://github.com/pywinrt/pywinrt"
@@ -35,7 +35,8 @@ dependencies = { file = "requirements.txt" }
35
35
  # use local winrt-sdk build dependency
36
36
  environment = { PYTHONPATH="../winrt-sdk/src" }
37
37
  # don't install winrt-sdk from PyPI
38
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
38
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ before-build = "uv pip install setuptools"
39
40
  # don't build for PyPy
40
41
  skip = "pp*"
41
42
  # suppress warnings about ARM64 testing
@@ -1,3 +1,3 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
- winrt-runtime==2.0.1
3
+ winrt-runtime==2.2.0
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import datetime
4
4
  import sys
@@ -16,7 +16,7 @@ Self = typing.TypeVar('Self')
16
16
  class DisplayRequest(winrt.system.Object):
17
17
  @staticmethod
18
18
  def _from(obj: winrt.system.Object, /) -> DisplayRequest: ...
19
- def __new__(cls: typing.Type[DisplayRequest]) -> DisplayRequest:...
19
+ def __new__(cls: typing.Type[DisplayRequest]) -> DisplayRequest: ...
20
20
  def request_active(self) -> None: ...
21
21
  def request_release(self) -> None: ...
22
22
 
@@ -1,4 +1,4 @@
1
- # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1
1
+ # WARNING: Please don't edit this file. It was generated by Python/WinRT v2.2.0
2
2
 
3
3
  import winrt.system
4
4
  from winrt import _winrt_windows_system_display
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.System.Display
3
- Version: 2.0.1
3
+ Version: 2.2.0
4
4
  Summary: Python projection of Windows Runtime (WinRT) APIs
5
5
  License: MIT
6
6
  Project-URL: Documentation, https://pywinrt.readthedocs.io
@@ -10,9 +10,9 @@ Classifier: Operating System :: Microsoft :: Windows
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: Implementation :: CPython
12
12
  Classifier: Intended Audience :: Developers
13
- Requires-Python: <3.13,>=3.9
13
+ Requires-Python: <3.14,>=3.9
14
14
  Description-Content-Type: text/markdown
15
- Requires-Dist: winrt-runtime==2.0.1
15
+ Requires-Dist: winrt-runtime==2.2.0
16
16
 
17
17
  <!-- warning: Please don't edit this file. It was automatically generated. -->
18
18
 
@@ -1 +0,0 @@
1
- 2.0.1