winrt-runtime 4.0.3__tar.gz → 4.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {winrt_runtime-4.0.3/python/winrt_runtime.egg-info → winrt_runtime-4.2.0}/PKG-INFO +1 -1
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/_winrt.pyi +9 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/runtime/_internals.py +184 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/runtime/interop.py +2 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0/python/winrt_runtime.egg-info}/PKG-INFO +1 -1
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/_winrt.cpp +25 -1
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.0.h +58 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.1.h +14 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.2.h +6 -1
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/interp.cpp +285 -26
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/interp.h +12 -1
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/module_state.h +8 -2
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/objects.cpp +343 -20
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/runtime.cpp +43 -27
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/runtime.h +2 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/types.cpp +15 -7
- winrt_runtime-4.2.0/version.txt +1 -0
- winrt_runtime-4.0.3/version.txt +0 -1
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/LICENSE +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/MANIFEST.in +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/README.md +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/pyproject.toml +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/__pyinstaller/__init__.py +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/__pyinstaller/hook-winrt.py +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/py.typed +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/runtime/__init__.py +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/runtime/py.typed +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/system/__init__.py +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/system/hresult.py +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt/system/py.typed +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt_runtime.egg-info/SOURCES.txt +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt_runtime.egg-info/dependency_links.txt +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt_runtime.egg-info/entry_points.txt +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt_runtime.egg-info/requires.txt +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/python/winrt_runtime.egg-info/top_level.txt +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/requirements.txt +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/setup.cfg +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/setup.py +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/_winrt_array.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/_winrt_array.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/_winrt_box.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/_winrt_buffer.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/_winrt_buffer.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/arrays.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/arrays.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/async.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/async.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/callbacks.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/callbacks.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/collections.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/collections.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/compose.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/compose.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/delegates.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/delegates.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/enums.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/enums.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/errors.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/generics.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/generics.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/handles.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/implements.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/implements.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/Windows.Foundation.Collections.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/Windows.Foundation.Metadata.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/Windows.Foundation.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/Windows.Storage.Streams.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/Windows.Storage.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/base.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/base_macros.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Devices.Geolocation.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Devices.Geolocation.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Collections.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Collections.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Collections.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Metadata.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Metadata.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Foundation.Metadata.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.FileProperties.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.FileProperties.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.FileProperties.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Provider.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Provider.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Provider.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Search.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Search.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Search.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Streams.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Streams.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.Storage.Streams.2.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.RemoteSystems.0.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.RemoteSystems.1.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pythoncapi_compat.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/abi.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/array.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/async.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/base.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/buffer.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/convert.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/errors.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/handles.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/prelude.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/throw_helpers.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/traits.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/pywinrt/wrappers.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/members.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/members.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/metaclass.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics-buffer.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics-buffer.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics-statics.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics-statics.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics-traits.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics-values.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/numerics.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/objects.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/protocols.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/protocols.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/pycollections.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/pycollections.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/pymapping.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/pymapping.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/pysequence.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/pysequence.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/shapes-generated.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/shapes.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/shapes.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/structs.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/structs.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/table.cpp +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/table.h +0 -0
- {winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/types.h +0 -0
|
@@ -42,6 +42,9 @@ def wrap_interface(
|
|
|
42
42
|
def wrap_interface(capsule: InterfaceCapsule, qualified_name: str, /) -> Any: ...
|
|
43
43
|
@overload
|
|
44
44
|
def wrap_interface(capsule: None, type: type[Object] | str, /) -> None: ...
|
|
45
|
+
def interface_pointer(
|
|
46
|
+
obj: Object | InterfaceCapsule | _SupportsInterfaceCapsule, /
|
|
47
|
+
) -> int: ...
|
|
45
48
|
def hresult_error(
|
|
46
49
|
hresult: SupportsIndex, error_info: InterfaceCapsule | None = None, /
|
|
47
50
|
) -> OSError: ...
|
|
@@ -95,6 +98,12 @@ class _SupportsQueryInterface(Protocol):
|
|
|
95
98
|
|
|
96
99
|
_TQueryInterface = TypeVar("_TQueryInterface", bound=_SupportsQueryInterface)
|
|
97
100
|
|
|
101
|
+
# What interface_pointer() needs from an interop class instance: a method that
|
|
102
|
+
# returns the capsule the instance holds. It must return the same capsule for
|
|
103
|
+
# the life of the instance.
|
|
104
|
+
class _SupportsInterfaceCapsule(Protocol):
|
|
105
|
+
def _interface_capsule_(self) -> InterfaceCapsule: ...
|
|
106
|
+
|
|
98
107
|
# Declared as an ABCMeta although at run time it derives from type: a type
|
|
99
108
|
# checker requires an abstract member to be implemented only under ABCMeta, and
|
|
100
109
|
# the members of an interface are abstract.
|
|
@@ -72,6 +72,46 @@ def load_projection(spec: ModuleSpec) -> None:
|
|
|
72
72
|
) from error
|
|
73
73
|
|
|
74
74
|
|
|
75
|
+
def note_missing_package(
|
|
76
|
+
error: ModuleNotFoundError, module: str, namespace: str
|
|
77
|
+
) -> None:
|
|
78
|
+
"""
|
|
79
|
+
Adds a note to ``error`` naming the package that provides ``module``, the
|
|
80
|
+
module of the WinRT namespace ``namespace``, when ``error`` is about
|
|
81
|
+
``module`` or a package it sits in, ``module`` is of the Windows SDK and
|
|
82
|
+
``error`` has no note yet.
|
|
83
|
+
|
|
84
|
+
The runtime calls this when it cannot import the module of a type or
|
|
85
|
+
delegate that a table refers to, or finds it only a namespace package. The
|
|
86
|
+
error is about the first module of ``module``'s packages that is missing,
|
|
87
|
+
which is ``module`` itself only if the packages it sits in are installed.
|
|
88
|
+
The note names the module when the error does not.
|
|
89
|
+
|
|
90
|
+
An error that has a note already is left as it is. The runtime meets one
|
|
91
|
+
when ``module`` is installed but importing it fails: a type it builds then,
|
|
92
|
+
such as a base class, needs a package ``module`` sits in that is missing,
|
|
93
|
+
and the runtime has noted that package.
|
|
94
|
+
|
|
95
|
+
Every package of the Windows SDK provides one namespace and is named after
|
|
96
|
+
it, as ``winrt-Windows.Storage`` provides ``winrt.windows.storage``, and
|
|
97
|
+
nothing else may define a ``Windows`` namespace, so the name of the module
|
|
98
|
+
is all it takes. The package of another family may be named after a
|
|
99
|
+
namespace that its own sits under, so its module does not say which it is.
|
|
100
|
+
"""
|
|
101
|
+
if not module.startswith("winrt.windows."):
|
|
102
|
+
return
|
|
103
|
+
|
|
104
|
+
if getattr(error, "__notes__", None):
|
|
105
|
+
return
|
|
106
|
+
|
|
107
|
+
name = error.name
|
|
108
|
+
if not name or (name != module and not module.startswith(f"{name}.")):
|
|
109
|
+
return
|
|
110
|
+
|
|
111
|
+
subject = "it" if name == module else module
|
|
112
|
+
error.add_note(f"The winrt-{namespace} package provides {subject}.")
|
|
113
|
+
|
|
114
|
+
|
|
75
115
|
class WinrtIntEnum(IntEnum):
|
|
76
116
|
"""
|
|
77
117
|
The base of every projected WinRT enum that is not a set of flags.
|
|
@@ -194,6 +234,150 @@ def alias_field(typ: type, name: str) -> None:
|
|
|
194
234
|
setattr(typ, name, property(field))
|
|
195
235
|
|
|
196
236
|
|
|
237
|
+
# Staged deprecation of the names a projection published and has since
|
|
238
|
+
# renamed, such as those PyWinRT now spells differently in Python. The
|
|
239
|
+
# generated calls to the functions below come from the projection's list of
|
|
240
|
+
# renames, which says when each name changed. This is DeprecationWarning, then
|
|
241
|
+
# FutureWarning, and after that the aliases are removed, on a schedule of its
|
|
242
|
+
# own rather than that of the v3.x method names.
|
|
243
|
+
_RENAMED_WARNING: type[Warning] = DeprecationWarning
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _owner_name(owner: type) -> str:
|
|
247
|
+
# an interface's members are reached through its wrapper type, _IFoo,
|
|
248
|
+
# which the user never meets, so it is named as the interface
|
|
249
|
+
return owner.__name__.removeprefix("_")
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _warn_renamed(owner: type, old: str, name: str, call: str = "") -> None:
|
|
253
|
+
warnings.warn(
|
|
254
|
+
f"{_owner_name(owner)}.{old}{call} is deprecated, use {name}{call} instead",
|
|
255
|
+
_RENAMED_WARNING,
|
|
256
|
+
stacklevel=3,
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def _add_renamed_method(target: type, owner: type, old: str, name: str) -> None:
|
|
261
|
+
# a real attribute of the type always wins over an alias
|
|
262
|
+
if old in vars(target):
|
|
263
|
+
return
|
|
264
|
+
|
|
265
|
+
def method(self: Any, *args: Any) -> Any:
|
|
266
|
+
_warn_renamed(owner, old, name, "()")
|
|
267
|
+
return getattr(self, name)(*args)
|
|
268
|
+
|
|
269
|
+
method.__name__ = old
|
|
270
|
+
method.__qualname__ = f"{_owner_name(owner)}.{old}"
|
|
271
|
+
method.__doc__ = f"Deprecated alias of ``{name}()``."
|
|
272
|
+
|
|
273
|
+
setattr(target, old, method)
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def _add_renamed_property(target: type, owner: type, old: str, name: str) -> None:
|
|
277
|
+
# a real attribute of the type always wins over an alias
|
|
278
|
+
if old in vars(target):
|
|
279
|
+
return
|
|
280
|
+
|
|
281
|
+
def get(self: Any) -> Any:
|
|
282
|
+
_warn_renamed(owner, old, name)
|
|
283
|
+
return getattr(self, name)
|
|
284
|
+
|
|
285
|
+
def put(self: Any, value: Any) -> None:
|
|
286
|
+
_warn_renamed(owner, old, name)
|
|
287
|
+
setattr(self, name, value)
|
|
288
|
+
|
|
289
|
+
setattr(target, old, property(get, put, doc=f"Deprecated alias of ``{name}``."))
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def renamed_method(typ: type, old: str, name: str) -> None:
|
|
293
|
+
"""
|
|
294
|
+
Adds a deprecated alias of a method to a projected type, by the name the
|
|
295
|
+
method was published with before it was renamed.
|
|
296
|
+
|
|
297
|
+
An event is renamed as its ``add_`` and ``remove_`` methods.
|
|
298
|
+
|
|
299
|
+
Args:
|
|
300
|
+
typ: The projected type.
|
|
301
|
+
old: The name the method had.
|
|
302
|
+
name: The name of the method now.
|
|
303
|
+
"""
|
|
304
|
+
_add_renamed_method(typ, typ, old, name)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
def renamed_static_method(typ: type, old: str, name: str) -> None:
|
|
308
|
+
"""
|
|
309
|
+
Adds a deprecated alias of a static method to a projected type, by the name
|
|
310
|
+
the method was published with before it was renamed.
|
|
311
|
+
|
|
312
|
+
Args:
|
|
313
|
+
typ: The projected type.
|
|
314
|
+
old: The name the method had.
|
|
315
|
+
name: The name of the method now.
|
|
316
|
+
"""
|
|
317
|
+
# static methods are implemented by the metaclass of the projected type
|
|
318
|
+
_add_renamed_method(type(typ), typ, old, name)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def renamed_property(typ: type, old: str, name: str) -> None:
|
|
322
|
+
"""
|
|
323
|
+
Adds a deprecated alias of a property to a projected type, by the name the
|
|
324
|
+
property was published with before it was renamed.
|
|
325
|
+
|
|
326
|
+
Args:
|
|
327
|
+
typ: The projected type.
|
|
328
|
+
old: The name the property had.
|
|
329
|
+
name: The name of the property now.
|
|
330
|
+
"""
|
|
331
|
+
_add_renamed_property(typ, typ, old, name)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
def renamed_static_property(typ: type, old: str, name: str) -> None:
|
|
335
|
+
"""
|
|
336
|
+
Adds a deprecated alias of a static property to a projected type, by the
|
|
337
|
+
name the property was published with before it was renamed.
|
|
338
|
+
|
|
339
|
+
Args:
|
|
340
|
+
typ: The projected type.
|
|
341
|
+
old: The name the property had.
|
|
342
|
+
name: The name of the property now.
|
|
343
|
+
"""
|
|
344
|
+
# static properties are implemented by the metaclass of the projected type
|
|
345
|
+
_add_renamed_property(type(typ), typ, old, name)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
class _RenamedEnumMember:
|
|
349
|
+
"""
|
|
350
|
+
The deprecated alias of an enum member: reading it warns and gives the
|
|
351
|
+
member. It is not a member itself, so it is not iterated and ``typ[old]``
|
|
352
|
+
does not find it.
|
|
353
|
+
"""
|
|
354
|
+
|
|
355
|
+
def __init__(self, old: str, name: str) -> None:
|
|
356
|
+
self.old = old
|
|
357
|
+
self.name = name
|
|
358
|
+
|
|
359
|
+
def __get__(self, instance: object, owner: type) -> Any:
|
|
360
|
+
_warn_renamed(owner, self.old, self.name)
|
|
361
|
+
return getattr(owner, self.name)
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def renamed_enum_member(typ: type, old: str, name: str) -> None:
|
|
365
|
+
"""
|
|
366
|
+
Adds a deprecated alias of a member to a projected enum, by the name the
|
|
367
|
+
member was published with before it was renamed.
|
|
368
|
+
|
|
369
|
+
Args:
|
|
370
|
+
typ: The projected enum.
|
|
371
|
+
old: The name the member had.
|
|
372
|
+
name: The name of the member now.
|
|
373
|
+
"""
|
|
374
|
+
# a real member or attribute of the enum always wins over an alias
|
|
375
|
+
if old in vars(typ):
|
|
376
|
+
return
|
|
377
|
+
|
|
378
|
+
setattr(typ, old, _RenamedEnumMember(old, name))
|
|
379
|
+
|
|
380
|
+
|
|
197
381
|
# NB: The types implemented in C cannot inherit from abc.ABC since Python 3.12
|
|
198
382
|
# so we have to implement the protocols like this instead.
|
|
199
383
|
# https://github.com/python/cpython/issues/103968#issuecomment-1589928055
|
|
@@ -7,6 +7,7 @@ from winrt._winrt import (
|
|
|
7
7
|
get_activation_factory,
|
|
8
8
|
hresult_error,
|
|
9
9
|
initialize_with_window,
|
|
10
|
+
interface_pointer,
|
|
10
11
|
wrap_interface,
|
|
11
12
|
)
|
|
12
13
|
|
|
@@ -16,6 +17,7 @@ __all__ = [
|
|
|
16
17
|
"get_activation_factory",
|
|
17
18
|
"hresult_error",
|
|
18
19
|
"initialize_with_window",
|
|
20
|
+
"interface_pointer",
|
|
19
21
|
"wrap_interface",
|
|
20
22
|
]
|
|
21
23
|
|
|
@@ -731,7 +731,21 @@ namespace py::cpp::_winrt
|
|
|
731
731
|
static PyObject* uninit_apartment(
|
|
732
732
|
PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
733
733
|
{
|
|
734
|
-
|
|
734
|
+
// The last CoUninitialize() of the process unloads the DLLs that
|
|
735
|
+
// implement the classes, so a factory kept past it would point into
|
|
736
|
+
// code that is no longer there. The runtime's own are let go of first,
|
|
737
|
+
// and so are the ones C++/WinRT keeps, which boxing a value asks for.
|
|
738
|
+
if (!py::interp::release_factories())
|
|
739
|
+
{
|
|
740
|
+
return nullptr;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
{
|
|
744
|
+
auto _gil = py::release_gil();
|
|
745
|
+
winrt::clear_factory_cache();
|
|
746
|
+
winrt::uninit_apartment();
|
|
747
|
+
}
|
|
748
|
+
|
|
735
749
|
Py_RETURN_NONE;
|
|
736
750
|
}
|
|
737
751
|
|
|
@@ -927,6 +941,7 @@ namespace py::cpp::_winrt
|
|
|
927
941
|
std::destroy_at(&state->type_entries);
|
|
928
942
|
std::destroy_at(&state->generic_types);
|
|
929
943
|
std::destroy_at(&state->buffer_exports);
|
|
944
|
+
std::destroy_at(&state->kept_factories);
|
|
930
945
|
|
|
931
946
|
std::destroy_at(&state->projections);
|
|
932
947
|
}
|
|
@@ -969,6 +984,7 @@ namespace py::cpp::_winrt
|
|
|
969
984
|
PyObject* as_interface(PyObject* /*unused*/, PyObject* args) noexcept;
|
|
970
985
|
PyObject* get_activation_factory(PyObject* /*unused*/, PyObject* args) noexcept;
|
|
971
986
|
PyObject* wrap_interface(PyObject* /*unused*/, PyObject* args) noexcept;
|
|
987
|
+
PyObject* interface_pointer(PyObject* /*unused*/, PyObject* obj) noexcept;
|
|
972
988
|
PyObject* hresult_error(PyObject* /*unused*/, PyObject* args) noexcept;
|
|
973
989
|
|
|
974
990
|
static PyMethodDef module_methods[]{
|
|
@@ -1058,6 +1074,13 @@ namespace py::cpp::_winrt
|
|
|
1058
1074
|
wrap_interface,
|
|
1059
1075
|
METH_VARARGS,
|
|
1060
1076
|
PyDoc_STR("The WinRT object an interface pointer capsule holds.")},
|
|
1077
|
+
{"interface_pointer",
|
|
1078
|
+
interface_pointer,
|
|
1079
|
+
METH_O,
|
|
1080
|
+
PyDoc_STR(
|
|
1081
|
+
"The raw COM pointer an object holds, as an int. It is borrowed: no "
|
|
1082
|
+
"reference is added, it is valid only while the object is alive, and "
|
|
1083
|
+
"a receiver that keeps it must AddRef() it.")},
|
|
1061
1084
|
{"hresult_error",
|
|
1062
1085
|
hresult_error,
|
|
1063
1086
|
METH_VARARGS,
|
|
@@ -1089,6 +1112,7 @@ namespace py::cpp::_winrt
|
|
|
1089
1112
|
std::construct_at(&state->type_entries);
|
|
1090
1113
|
std::construct_at(&state->generic_types);
|
|
1091
1114
|
std::construct_at(&state->buffer_exports);
|
|
1115
|
+
std::construct_at(&state->kept_factories);
|
|
1092
1116
|
|
|
1093
1117
|
// The slot below says the same, but CPython only enforces it in an
|
|
1094
1118
|
// interpreter configured to check, which a legacy subinterpreter on a
|
{winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.0.h
RENAMED
|
@@ -186,6 +186,14 @@ WINRT_EXPORT namespace winrt::Windows::System
|
|
|
186
186
|
Unknown = 3,
|
|
187
187
|
Ambiguous = 4,
|
|
188
188
|
};
|
|
189
|
+
enum class UserAgeVerificationStatus : std::int32_t
|
|
190
|
+
{
|
|
191
|
+
NotApplicable = 0,
|
|
192
|
+
TemporarilyUnavailable = 1,
|
|
193
|
+
Unverified = 2,
|
|
194
|
+
OptedOut = 3,
|
|
195
|
+
Verified = 4,
|
|
196
|
+
};
|
|
189
197
|
enum class UserAuthenticationStatus : std::int32_t
|
|
190
198
|
{
|
|
191
199
|
Unauthenticated = 0,
|
|
@@ -473,6 +481,8 @@ WINRT_EXPORT namespace winrt::Windows::System
|
|
|
473
481
|
struct ITimeZoneSettingsStatics2;
|
|
474
482
|
struct IUser;
|
|
475
483
|
struct IUser2;
|
|
484
|
+
struct IUser3;
|
|
485
|
+
struct IUserAgeRange;
|
|
476
486
|
struct IUserAuthenticationStatusChangeDeferral;
|
|
477
487
|
struct IUserAuthenticationStatusChangingEventArgs;
|
|
478
488
|
struct IUserChangedEventArgs;
|
|
@@ -523,6 +533,7 @@ WINRT_EXPORT namespace winrt::Windows::System
|
|
|
523
533
|
struct ShutdownManager;
|
|
524
534
|
struct TimeZoneSettings;
|
|
525
535
|
struct User;
|
|
536
|
+
struct UserAgeRange;
|
|
526
537
|
struct UserAuthenticationStatusChangeDeferral;
|
|
527
538
|
struct UserAuthenticationStatusChangingEventArgs;
|
|
528
539
|
struct UserChangedEventArgs;
|
|
@@ -604,6 +615,8 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
604
615
|
template <> struct category<winrt::Windows::System::ITimeZoneSettingsStatics2>{ using type = interface_category; };
|
|
605
616
|
template <> struct category<winrt::Windows::System::IUser>{ using type = interface_category; };
|
|
606
617
|
template <> struct category<winrt::Windows::System::IUser2>{ using type = interface_category; };
|
|
618
|
+
template <> struct category<winrt::Windows::System::IUser3>{ using type = interface_category; };
|
|
619
|
+
template <> struct category<winrt::Windows::System::IUserAgeRange>{ using type = interface_category; };
|
|
607
620
|
template <> struct category<winrt::Windows::System::IUserAuthenticationStatusChangeDeferral>{ using type = interface_category; };
|
|
608
621
|
template <> struct category<winrt::Windows::System::IUserAuthenticationStatusChangingEventArgs>{ using type = interface_category; };
|
|
609
622
|
template <> struct category<winrt::Windows::System::IUserChangedEventArgs>{ using type = interface_category; };
|
|
@@ -654,6 +667,7 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
654
667
|
template <> struct category<winrt::Windows::System::ShutdownManager>{ using type = class_category; };
|
|
655
668
|
template <> struct category<winrt::Windows::System::TimeZoneSettings>{ using type = class_category; };
|
|
656
669
|
template <> struct category<winrt::Windows::System::User>{ using type = class_category; };
|
|
670
|
+
template <> struct category<winrt::Windows::System::UserAgeRange>{ using type = class_category; };
|
|
657
671
|
template <> struct category<winrt::Windows::System::UserAuthenticationStatusChangeDeferral>{ using type = class_category; };
|
|
658
672
|
template <> struct category<winrt::Windows::System::UserAuthenticationStatusChangingEventArgs>{ using type = class_category; };
|
|
659
673
|
template <> struct category<winrt::Windows::System::UserChangedEventArgs>{ using type = class_category; };
|
|
@@ -679,6 +693,7 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
679
693
|
template <> struct category<winrt::Windows::System::ShutdownKind>{ using type = enum_category; };
|
|
680
694
|
template <> struct category<winrt::Windows::System::UserAgeConsentGroup>{ using type = enum_category; };
|
|
681
695
|
template <> struct category<winrt::Windows::System::UserAgeConsentResult>{ using type = enum_category; };
|
|
696
|
+
template <> struct category<winrt::Windows::System::UserAgeVerificationStatus>{ using type = enum_category; };
|
|
682
697
|
template <> struct category<winrt::Windows::System::UserAuthenticationStatus>{ using type = enum_category; };
|
|
683
698
|
template <> struct category<winrt::Windows::System::UserPictureSize>{ using type = enum_category; };
|
|
684
699
|
template <> struct category<winrt::Windows::System::UserType>{ using type = enum_category; };
|
|
@@ -726,6 +741,7 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
726
741
|
template <> inline constexpr auto& name_v<winrt::Windows::System::ShutdownManager> = L"Windows.System.ShutdownManager";
|
|
727
742
|
template <> inline constexpr auto& name_v<winrt::Windows::System::TimeZoneSettings> = L"Windows.System.TimeZoneSettings";
|
|
728
743
|
template <> inline constexpr auto& name_v<winrt::Windows::System::User> = L"Windows.System.User";
|
|
744
|
+
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAgeRange> = L"Windows.System.UserAgeRange";
|
|
729
745
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAuthenticationStatusChangeDeferral> = L"Windows.System.UserAuthenticationStatusChangeDeferral";
|
|
730
746
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAuthenticationStatusChangingEventArgs> = L"Windows.System.UserAuthenticationStatusChangingEventArgs";
|
|
731
747
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserChangedEventArgs> = L"Windows.System.UserChangedEventArgs";
|
|
@@ -751,6 +767,7 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
751
767
|
template <> inline constexpr auto& name_v<winrt::Windows::System::ShutdownKind> = L"Windows.System.ShutdownKind";
|
|
752
768
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAgeConsentGroup> = L"Windows.System.UserAgeConsentGroup";
|
|
753
769
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAgeConsentResult> = L"Windows.System.UserAgeConsentResult";
|
|
770
|
+
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAgeVerificationStatus> = L"Windows.System.UserAgeVerificationStatus";
|
|
754
771
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserAuthenticationStatus> = L"Windows.System.UserAuthenticationStatus";
|
|
755
772
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserPictureSize> = L"Windows.System.UserPictureSize";
|
|
756
773
|
template <> inline constexpr auto& name_v<winrt::Windows::System::UserType> = L"Windows.System.UserType";
|
|
@@ -827,6 +844,8 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
827
844
|
template <> inline constexpr auto& name_v<winrt::Windows::System::ITimeZoneSettingsStatics2> = L"Windows.System.ITimeZoneSettingsStatics2";
|
|
828
845
|
template <> inline constexpr auto& name_v<winrt::Windows::System::IUser> = L"Windows.System.IUser";
|
|
829
846
|
template <> inline constexpr auto& name_v<winrt::Windows::System::IUser2> = L"Windows.System.IUser2";
|
|
847
|
+
template <> inline constexpr auto& name_v<winrt::Windows::System::IUser3> = L"Windows.System.IUser3";
|
|
848
|
+
template <> inline constexpr auto& name_v<winrt::Windows::System::IUserAgeRange> = L"Windows.System.IUserAgeRange";
|
|
830
849
|
template <> inline constexpr auto& name_v<winrt::Windows::System::IUserAuthenticationStatusChangeDeferral> = L"Windows.System.IUserAuthenticationStatusChangeDeferral";
|
|
831
850
|
template <> inline constexpr auto& name_v<winrt::Windows::System::IUserAuthenticationStatusChangingEventArgs> = L"Windows.System.IUserAuthenticationStatusChangingEventArgs";
|
|
832
851
|
template <> inline constexpr auto& name_v<winrt::Windows::System::IUserChangedEventArgs> = L"Windows.System.IUserChangedEventArgs";
|
|
@@ -909,6 +928,8 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
909
928
|
template <> inline constexpr guid guid_v<winrt::Windows::System::ITimeZoneSettingsStatics2>{ 0x555C0DB8,0x39A8,0x49FA,{ 0xB4,0xF6,0xA2,0xC7,0xFC,0x28,0x42,0xEC } }; // 555C0DB8-39A8-49FA-B4F6-A2C7FC2842EC
|
|
910
929
|
template <> inline constexpr guid guid_v<winrt::Windows::System::IUser>{ 0xDF9A26C6,0xE746,0x4BCD,{ 0xB5,0xD4,0x12,0x01,0x03,0xC4,0x20,0x9B } }; // DF9A26C6-E746-4BCD-B5D4-120103C4209B
|
|
911
930
|
template <> inline constexpr guid guid_v<winrt::Windows::System::IUser2>{ 0x98BA5628,0xA6E3,0x518E,{ 0x89,0xD9,0xD3,0xB2,0xB1,0x99,0x1A,0x10 } }; // 98BA5628-A6E3-518E-89D9-D3B2B1991A10
|
|
931
|
+
template <> inline constexpr guid guid_v<winrt::Windows::System::IUser3>{ 0x520E18E2,0xF00D,0x53D1,{ 0xA9,0xF6,0x88,0xC6,0x97,0x56,0x1D,0xC0 } }; // 520E18E2-F00D-53D1-A9F6-88C697561DC0
|
|
932
|
+
template <> inline constexpr guid guid_v<winrt::Windows::System::IUserAgeRange>{ 0xD002FFCA,0x8130,0x5F64,{ 0xBE,0x0F,0xE6,0x6A,0xDB,0x64,0xDD,0x12 } }; // D002FFCA-8130-5F64-BE0F-E66ADB64DD12
|
|
912
933
|
template <> inline constexpr guid guid_v<winrt::Windows::System::IUserAuthenticationStatusChangeDeferral>{ 0x88B59568,0xBB30,0x42FB,{ 0xA2,0x70,0xE9,0x90,0x2E,0x40,0xEF,0xA7 } }; // 88B59568-BB30-42FB-A270-E9902E40EFA7
|
|
913
934
|
template <> inline constexpr guid guid_v<winrt::Windows::System::IUserAuthenticationStatusChangingEventArgs>{ 0x8C030F28,0xA711,0x4C1E,{ 0xAB,0x48,0x04,0x17,0x9C,0x15,0x93,0x8F } }; // 8C030F28-A711-4C1E-AB48-04179C15938F
|
|
914
935
|
template <> inline constexpr guid guid_v<winrt::Windows::System::IUserChangedEventArgs>{ 0x086459DC,0x18C6,0x48DB,{ 0xBC,0x99,0x72,0x4F,0xB9,0x20,0x3C,0xCC } }; // 086459DC-18C6-48DB-BC99-724FB9203CCC
|
|
@@ -952,6 +973,7 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
952
973
|
template <> struct default_interface<winrt::Windows::System::ProtocolForResultsOperation>{ using type = winrt::Windows::System::IProtocolForResultsOperation; };
|
|
953
974
|
template <> struct default_interface<winrt::Windows::System::RemoteLauncherOptions>{ using type = winrt::Windows::System::IRemoteLauncherOptions; };
|
|
954
975
|
template <> struct default_interface<winrt::Windows::System::User>{ using type = winrt::Windows::System::IUser; };
|
|
976
|
+
template <> struct default_interface<winrt::Windows::System::UserAgeRange>{ using type = winrt::Windows::System::IUserAgeRange; };
|
|
955
977
|
template <> struct default_interface<winrt::Windows::System::UserAuthenticationStatusChangeDeferral>{ using type = winrt::Windows::System::IUserAuthenticationStatusChangeDeferral; };
|
|
956
978
|
template <> struct default_interface<winrt::Windows::System::UserAuthenticationStatusChangingEventArgs>{ using type = winrt::Windows::System::IUserAuthenticationStatusChangingEventArgs; };
|
|
957
979
|
template <> struct default_interface<winrt::Windows::System::UserChangedEventArgs>{ using type = winrt::Windows::System::IUserChangedEventArgs; };
|
|
@@ -1602,6 +1624,22 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
1602
1624
|
virtual std::int32_t __stdcall CheckUserAgeConsentGroupAsync(std::int32_t, void**) noexcept = 0;
|
|
1603
1625
|
};
|
|
1604
1626
|
};
|
|
1627
|
+
template <> struct abi<winrt::Windows::System::IUser3>
|
|
1628
|
+
{
|
|
1629
|
+
struct WINRT_IMPL_ABI_DECL type : inspectable_abi
|
|
1630
|
+
{
|
|
1631
|
+
virtual std::int32_t __stdcall GetUserAgeRangeAsync(void**) noexcept = 0;
|
|
1632
|
+
virtual std::int32_t __stdcall GetAgeVerificationStatusAsync(void**) noexcept = 0;
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
template <> struct abi<winrt::Windows::System::IUserAgeRange>
|
|
1636
|
+
{
|
|
1637
|
+
struct WINRT_IMPL_ABI_DECL type : inspectable_abi
|
|
1638
|
+
{
|
|
1639
|
+
virtual std::int32_t __stdcall get_Lower(std::int32_t*) noexcept = 0;
|
|
1640
|
+
virtual std::int32_t __stdcall get_Upper(std::int32_t*) noexcept = 0;
|
|
1641
|
+
};
|
|
1642
|
+
};
|
|
1605
1643
|
template <> struct abi<winrt::Windows::System::IUserAuthenticationStatusChangeDeferral>
|
|
1606
1644
|
{
|
|
1607
1645
|
struct WINRT_IMPL_ABI_DECL type : inspectable_abi
|
|
@@ -2530,6 +2568,26 @@ WINRT_EXPORT namespace winrt::impl
|
|
|
2530
2568
|
template <typename D> using type = consume_Windows_System_IUser2<D>;
|
|
2531
2569
|
};
|
|
2532
2570
|
template <typename D>
|
|
2571
|
+
struct consume_Windows_System_IUser3
|
|
2572
|
+
{
|
|
2573
|
+
auto GetUserAgeRangeAsync() const;
|
|
2574
|
+
auto GetAgeVerificationStatusAsync() const;
|
|
2575
|
+
};
|
|
2576
|
+
template <> struct consume<winrt::Windows::System::IUser3>
|
|
2577
|
+
{
|
|
2578
|
+
template <typename D> using type = consume_Windows_System_IUser3<D>;
|
|
2579
|
+
};
|
|
2580
|
+
template <typename D>
|
|
2581
|
+
struct consume_Windows_System_IUserAgeRange
|
|
2582
|
+
{
|
|
2583
|
+
[[nodiscard]] auto Lower() const;
|
|
2584
|
+
[[nodiscard]] auto Upper() const;
|
|
2585
|
+
};
|
|
2586
|
+
template <> struct consume<winrt::Windows::System::IUserAgeRange>
|
|
2587
|
+
{
|
|
2588
|
+
template <typename D> using type = consume_Windows_System_IUserAgeRange<D>;
|
|
2589
|
+
};
|
|
2590
|
+
template <typename D>
|
|
2533
2591
|
struct consume_Windows_System_IUserAuthenticationStatusChangeDeferral
|
|
2534
2592
|
{
|
|
2535
2593
|
auto Complete() const;
|
{winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.1.h
RENAMED
|
@@ -492,6 +492,20 @@ WINRT_EXPORT namespace winrt::Windows::System
|
|
|
492
492
|
IUser2(std::nullptr_t = nullptr) noexcept {}
|
|
493
493
|
IUser2(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {}
|
|
494
494
|
};
|
|
495
|
+
struct WINRT_IMPL_EMPTY_BASES IUser3 :
|
|
496
|
+
winrt::Windows::Foundation::IInspectable,
|
|
497
|
+
impl::consume_t<IUser3>
|
|
498
|
+
{
|
|
499
|
+
IUser3(std::nullptr_t = nullptr) noexcept {}
|
|
500
|
+
IUser3(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {}
|
|
501
|
+
};
|
|
502
|
+
struct WINRT_IMPL_EMPTY_BASES IUserAgeRange :
|
|
503
|
+
winrt::Windows::Foundation::IInspectable,
|
|
504
|
+
impl::consume_t<IUserAgeRange>
|
|
505
|
+
{
|
|
506
|
+
IUserAgeRange(std::nullptr_t = nullptr) noexcept {}
|
|
507
|
+
IUserAgeRange(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {}
|
|
508
|
+
};
|
|
495
509
|
struct WINRT_IMPL_EMPTY_BASES IUserAuthenticationStatusChangeDeferral :
|
|
496
510
|
winrt::Windows::Foundation::IInspectable,
|
|
497
511
|
impl::consume_t<IUserAuthenticationStatusChangeDeferral>
|
{winrt_runtime-4.0.3 → winrt_runtime-4.2.0}/src/include/cppwinrt/winrt/impl/Windows.System.2.h
RENAMED
|
@@ -308,7 +308,7 @@ WINRT_EXPORT namespace winrt::Windows::System
|
|
|
308
308
|
static auto AutoUpdateTimeZoneAsync(winrt::Windows::Foundation::TimeSpan const& timeout);
|
|
309
309
|
};
|
|
310
310
|
struct WINRT_IMPL_EMPTY_BASES User : winrt::Windows::System::IUser,
|
|
311
|
-
impl::require<User, winrt::Windows::System::IUser2>
|
|
311
|
+
impl::require<User, winrt::Windows::System::IUser2, winrt::Windows::System::IUser3>
|
|
312
312
|
{
|
|
313
313
|
User(std::nullptr_t) noexcept {}
|
|
314
314
|
User(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::System::IUser(ptr, take_ownership_from_abi) {}
|
|
@@ -319,6 +319,11 @@ WINRT_EXPORT namespace winrt::Windows::System
|
|
|
319
319
|
static auto GetFromId(param::hstring const& nonRoamableId);
|
|
320
320
|
static auto GetDefault();
|
|
321
321
|
};
|
|
322
|
+
struct WINRT_IMPL_EMPTY_BASES UserAgeRange : winrt::Windows::System::IUserAgeRange
|
|
323
|
+
{
|
|
324
|
+
UserAgeRange(std::nullptr_t) noexcept {}
|
|
325
|
+
UserAgeRange(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::System::IUserAgeRange(ptr, take_ownership_from_abi) {}
|
|
326
|
+
};
|
|
322
327
|
struct WINRT_IMPL_EMPTY_BASES UserAuthenticationStatusChangeDeferral : winrt::Windows::System::IUserAuthenticationStatusChangeDeferral
|
|
323
328
|
{
|
|
324
329
|
UserAuthenticationStatusChangeDeferral(std::nullptr_t) noexcept {}
|