winrt-Windows.UI.Accessibility 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 (19) hide show
  1. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/PKG-INFO +4 -4
  2. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/all-requirements.txt +2 -2
  3. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/py.Windows.UI.Accessibility.cpp +90 -61
  4. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/pyproject.toml +3 -2
  5. winrt_windows_ui_accessibility-2.2.0/pywinrt-version.txt +1 -0
  6. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/requirements.txt +2 -2
  7. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt/_winrt_windows_ui_accessibility.pyi +6 -6
  8. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt/windows/ui/accessibility/__init__.py +1 -1
  9. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt_Windows.UI.Accessibility.egg-info/PKG-INFO +4 -4
  10. winrt_windows_ui_accessibility-2.2.0/winrt_Windows.UI.Accessibility.egg-info/requires.txt +4 -0
  11. winrt_windows_ui_accessibility-2.0.1/pywinrt-version.txt +0 -1
  12. winrt_windows_ui_accessibility-2.0.1/winrt_Windows.UI.Accessibility.egg-info/requires.txt +0 -4
  13. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/README.md +0 -0
  14. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/setup.cfg +0 -0
  15. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/setup.py +0 -0
  16. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt/windows/ui/accessibility/py.typed +0 -0
  17. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt_Windows.UI.Accessibility.egg-info/SOURCES.txt +0 -0
  18. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt_Windows.UI.Accessibility.egg-info/dependency_links.txt +0 -0
  19. {winrt_windows_ui_accessibility-2.0.1 → winrt_windows_ui_accessibility-2.2.0}/winrt_Windows.UI.Accessibility.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Accessibility
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,11 +10,11 @@ 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
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -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-Windows.Foundation[all]==2.0.1
3
+ winrt-Windows.Foundation[all]==2.2.0
@@ -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.UI.Accessibility.h"
4
4
 
5
-
6
5
  namespace py::cpp::Windows::UI::Accessibility
7
6
  {
8
7
  // ----- ScreenReaderPositionChangedEventArgs class --------------------
@@ -24,14 +23,21 @@ namespace py::cpp::Windows::UI::Accessibility
24
23
 
25
24
  static PyObject* ScreenReaderPositionChangedEventArgs_get_IsReadingText(py::wrapper::Windows::UI::Accessibility::ScreenReaderPositionChangedEventArgs* self, void* /*unused*/) noexcept
26
25
  {
27
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Accessibility.ScreenReaderPositionChangedEventArgs", L"IsReadingText"))
28
- {
29
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
30
- return nullptr;
31
- }
32
-
33
26
  try
34
27
  {
28
+ static std::optional<bool> is_property_present{};
29
+
30
+ if (!is_property_present.has_value())
31
+ {
32
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Accessibility.ScreenReaderPositionChangedEventArgs", L"IsReadingText");
33
+ }
34
+
35
+ if (!is_property_present.value())
36
+ {
37
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
38
+ return nullptr;
39
+ }
40
+
35
41
  return py::convert(self->obj.IsReadingText());
36
42
  }
37
43
  catch (...)
@@ -43,14 +49,21 @@ namespace py::cpp::Windows::UI::Accessibility
43
49
 
44
50
  static PyObject* ScreenReaderPositionChangedEventArgs_get_ScreenPositionInRawPixels(py::wrapper::Windows::UI::Accessibility::ScreenReaderPositionChangedEventArgs* self, void* /*unused*/) noexcept
45
51
  {
46
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Accessibility.ScreenReaderPositionChangedEventArgs", L"ScreenPositionInRawPixels"))
47
- {
48
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
49
- return nullptr;
50
- }
51
-
52
52
  try
53
53
  {
54
+ static std::optional<bool> is_property_present{};
55
+
56
+ if (!is_property_present.has_value())
57
+ {
58
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Accessibility.ScreenReaderPositionChangedEventArgs", L"ScreenPositionInRawPixels");
59
+ }
60
+
61
+ if (!is_property_present.value())
62
+ {
63
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
64
+ return nullptr;
65
+ }
66
+
54
67
  return py::convert(self->obj.ScreenPositionInRawPixels());
55
68
  }
56
69
  catch (...)
@@ -96,23 +109,20 @@ namespace py::cpp::Windows::UI::Accessibility
96
109
  { }
97
110
  };
98
111
 
99
- static PyType_Slot _type_slots_ScreenReaderPositionChangedEventArgs[] =
100
- {
112
+ static PyType_Slot _type_slots_ScreenReaderPositionChangedEventArgs[] = {
101
113
  { Py_tp_new, reinterpret_cast<void*>(_new_ScreenReaderPositionChangedEventArgs) },
102
114
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ScreenReaderPositionChangedEventArgs) },
103
115
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ScreenReaderPositionChangedEventArgs) },
104
116
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ScreenReaderPositionChangedEventArgs) },
105
- { },
117
+ { }
106
118
  };
107
119
 
108
- static PyType_Spec type_spec_ScreenReaderPositionChangedEventArgs =
109
- {
120
+ static PyType_Spec type_spec_ScreenReaderPositionChangedEventArgs = {
110
121
  "winrt._winrt_windows_ui_accessibility.ScreenReaderPositionChangedEventArgs",
111
122
  sizeof(py::wrapper::Windows::UI::Accessibility::ScreenReaderPositionChangedEventArgs),
112
123
  0,
113
124
  Py_TPFLAGS_DEFAULT,
114
- _type_slots_ScreenReaderPositionChangedEventArgs
115
- };
125
+ _type_slots_ScreenReaderPositionChangedEventArgs};
116
126
 
117
127
  // ----- ScreenReaderService class --------------------
118
128
 
@@ -129,7 +139,7 @@ namespace py::cpp::Windows::UI::Accessibility
129
139
  {
130
140
  try
131
141
  {
132
- winrt::Windows::UI::Accessibility::ScreenReaderService instance{ };
142
+ winrt::Windows::UI::Accessibility::ScreenReaderService instance{};
133
143
  return py::wrap(instance, type);
134
144
  }
135
145
  catch (...)
@@ -155,14 +165,21 @@ namespace py::cpp::Windows::UI::Accessibility
155
165
 
156
166
  static PyObject* ScreenReaderService_get_CurrentScreenReaderPosition(py::wrapper::Windows::UI::Accessibility::ScreenReaderService* self, void* /*unused*/) noexcept
157
167
  {
158
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Accessibility.ScreenReaderService", L"CurrentScreenReaderPosition"))
159
- {
160
- PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
161
- return nullptr;
162
- }
163
-
164
168
  try
165
169
  {
170
+ static std::optional<bool> is_property_present{};
171
+
172
+ if (!is_property_present.has_value())
173
+ {
174
+ is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.UI.Accessibility.ScreenReaderService", L"CurrentScreenReaderPosition");
175
+ }
176
+
177
+ if (!is_property_present.value())
178
+ {
179
+ PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
180
+ return nullptr;
181
+ }
182
+
166
183
  return py::convert(self->obj.CurrentScreenReaderPosition());
167
184
  }
168
185
  catch (...)
@@ -174,14 +191,21 @@ namespace py::cpp::Windows::UI::Accessibility
174
191
 
175
192
  static PyObject* ScreenReaderService_add_ScreenReaderPositionChanged(py::wrapper::Windows::UI::Accessibility::ScreenReaderService* self, PyObject* arg) noexcept
176
193
  {
177
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Accessibility.ScreenReaderService", L"ScreenReaderPositionChanged"))
178
- {
179
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
180
- return nullptr;
181
- }
182
-
183
194
  try
184
195
  {
196
+ static std::optional<bool> is_event_present{};
197
+
198
+ if (!is_event_present.has_value())
199
+ {
200
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Accessibility.ScreenReaderService", L"ScreenReaderPositionChanged");
201
+ }
202
+
203
+ if (!is_event_present.value())
204
+ {
205
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
206
+ return nullptr;
207
+ }
208
+
185
209
  auto param0 = py::convert_to<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Accessibility::ScreenReaderService, winrt::Windows::UI::Accessibility::ScreenReaderPositionChangedEventArgs>>(arg);
186
210
 
187
211
  return py::convert(self->obj.ScreenReaderPositionChanged(param0));
@@ -195,14 +219,21 @@ namespace py::cpp::Windows::UI::Accessibility
195
219
 
196
220
  static PyObject* ScreenReaderService_remove_ScreenReaderPositionChanged(py::wrapper::Windows::UI::Accessibility::ScreenReaderService* self, PyObject* arg) noexcept
197
221
  {
198
- if (!winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Accessibility.ScreenReaderService", L"ScreenReaderPositionChanged"))
199
- {
200
- PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
201
- return nullptr;
202
- }
203
-
204
222
  try
205
223
  {
224
+ static std::optional<bool> is_event_present{};
225
+
226
+ if (!is_event_present.has_value())
227
+ {
228
+ is_event_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsEventPresent(L"Windows.UI.Accessibility.ScreenReaderService", L"ScreenReaderPositionChanged");
229
+ }
230
+
231
+ if (!is_event_present.value())
232
+ {
233
+ PyErr_SetString(PyExc_AttributeError, "event is not available in this version of Windows");
234
+ return nullptr;
235
+ }
236
+
206
237
  auto param0 = py::convert_to<winrt::event_token>(arg);
207
238
 
208
239
  self->obj.ScreenReaderPositionChanged(param0);
@@ -252,39 +283,35 @@ namespace py::cpp::Windows::UI::Accessibility
252
283
  { }
253
284
  };
254
285
 
255
- static PyType_Slot _type_slots_ScreenReaderService[] =
256
- {
286
+ static PyType_Slot _type_slots_ScreenReaderService[] = {
257
287
  { Py_tp_new, reinterpret_cast<void*>(_new_ScreenReaderService) },
258
288
  { Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ScreenReaderService) },
259
289
  { Py_tp_methods, reinterpret_cast<void*>(_methods_ScreenReaderService) },
260
290
  { Py_tp_getset, reinterpret_cast<void*>(_getset_ScreenReaderService) },
261
- { },
291
+ { }
262
292
  };
263
293
 
264
- static PyType_Spec type_spec_ScreenReaderService =
265
- {
294
+ static PyType_Spec type_spec_ScreenReaderService = {
266
295
  "winrt._winrt_windows_ui_accessibility.ScreenReaderService",
267
296
  sizeof(py::wrapper::Windows::UI::Accessibility::ScreenReaderService),
268
297
  0,
269
298
  Py_TPFLAGS_DEFAULT,
270
- _type_slots_ScreenReaderService
271
- };
299
+ _type_slots_ScreenReaderService};
272
300
 
273
301
  // ----- Windows.UI.Accessibility Initialization --------------------
274
- PyDoc_STRVAR(module_doc, "Windows::UI::Accessibility");
275
302
 
303
+ PyDoc_STRVAR(module_doc, "Windows.UI.Accessibility");
276
304
 
277
- static PyModuleDef module_def
278
- = {PyModuleDef_HEAD_INIT,
279
- "_winrt_windows_ui_accessibility",
280
- module_doc,
281
- 0,
282
- nullptr,
283
- nullptr,
284
- nullptr,
285
- nullptr,
286
- nullptr};
287
-
305
+ static PyModuleDef module_def = {
306
+ PyModuleDef_HEAD_INIT,
307
+ "_winrt_windows_ui_accessibility",
308
+ module_doc,
309
+ 0,
310
+ nullptr,
311
+ nullptr,
312
+ nullptr,
313
+ nullptr,
314
+ nullptr};
288
315
  } // py::cpp::Windows::UI::Accessibility
289
316
 
290
317
  PyMODINIT_FUNC PyInit__winrt_windows_ui_accessibility(void) noexcept
@@ -316,12 +343,14 @@ PyMODINIT_FUNC PyInit__winrt_windows_ui_accessibility(void) noexcept
316
343
  return nullptr;
317
344
  }
318
345
 
319
- if (py::register_python_type(module.get(), &type_spec_ScreenReaderPositionChangedEventArgs, object_bases.get(), nullptr) == -1)
346
+ py::pytype_handle ScreenReaderPositionChangedEventArgs_type{py::register_python_type(module.get(), &type_spec_ScreenReaderPositionChangedEventArgs, object_bases.get(), nullptr)};
347
+ if (!ScreenReaderPositionChangedEventArgs_type)
320
348
  {
321
349
  return nullptr;
322
350
  }
323
351
 
324
- if (py::register_python_type(module.get(), &type_spec_ScreenReaderService, object_bases.get(), nullptr) == -1)
352
+ py::pytype_handle ScreenReaderService_type{py::register_python_type(module.get(), &type_spec_ScreenReaderService, object_bases.get(), nullptr)};
353
+ if (!ScreenReaderService_type)
325
354
  {
326
355
  return nullptr;
327
356
  }
@@ -16,7 +16,7 @@ classifiers = [
16
16
  "Intended Audience :: Developers",
17
17
  ]
18
18
  dynamic = ["version", "dependencies", "optional-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"
@@ -36,7 +36,8 @@ optional-dependencies.all = { file = "all-requirements.txt" }
36
36
  # use local winrt-sdk build dependency
37
37
  environment = { PYTHONPATH="../winrt-sdk/src" }
38
38
  # don't install winrt-sdk from PyPI
39
- build-frontend = { name = "build", args = ["--skip-dependency-check", "--no-isolation"] }
39
+ build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
40
+ before-build = "uv pip install setuptools"
40
41
  # don't build for PyPy
41
42
  skip = "pp*"
42
43
  # 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
@@ -9,7 +9,7 @@ from builtins import property as _property
9
9
 
10
10
  import winrt._winrt
11
11
  import winrt.system
12
- import winrt.windows.foundation
12
+ import winrt.windows.foundation as windows_foundation
13
13
 
14
14
  Self = typing.TypeVar('Self')
15
15
 
@@ -20,15 +20,15 @@ class ScreenReaderPositionChangedEventArgs(winrt.system.Object):
20
20
  @_property
21
21
  def is_reading_text(self) -> bool: ...
22
22
  @_property
23
- def screen_position_in_raw_pixels(self) -> winrt.windows.foundation.Rect: ...
23
+ def screen_position_in_raw_pixels(self) -> windows_foundation.Rect: ...
24
24
 
25
25
  @typing.final
26
26
  class ScreenReaderService(winrt.system.Object):
27
27
  @staticmethod
28
28
  def _from(obj: winrt.system.Object, /) -> ScreenReaderService: ...
29
- def __new__(cls: typing.Type[ScreenReaderService]) -> ScreenReaderService:...
30
- def add_screen_reader_position_changed(self, handler: winrt.windows.foundation.TypedEventHandler[ScreenReaderService, ScreenReaderPositionChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
31
- def remove_screen_reader_position_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
29
+ def __new__(cls: typing.Type[ScreenReaderService]) -> ScreenReaderService: ...
30
+ def add_screen_reader_position_changed(self, handler: windows_foundation.TypedEventHandler[ScreenReaderService, ScreenReaderPositionChangedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
31
+ def remove_screen_reader_position_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
32
32
  @_property
33
33
  def current_screen_reader_position(self) -> typing.Optional[ScreenReaderPositionChangedEventArgs]: ...
34
34
 
@@ -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_ui_accessibility
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: winrt-Windows.UI.Accessibility
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,11 +10,11 @@ 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
  Provides-Extra: all
17
- Requires-Dist: winrt-Windows.Foundation[all]==2.0.1; extra == "all"
17
+ Requires-Dist: winrt-Windows.Foundation[all]==2.2.0; extra == "all"
18
18
 
19
19
  <!-- warning: Please don't edit this file. It was automatically generated. -->
20
20
 
@@ -0,0 +1,4 @@
1
+ winrt-runtime==2.2.0
2
+
3
+ [all]
4
+ winrt-Windows.Foundation[all]==2.2.0
@@ -1,4 +0,0 @@
1
- winrt-runtime==2.0.1
2
-
3
- [all]
4
- winrt-Windows.Foundation[all]==2.0.1