winrt-Windows.System.Threading 3.2.1__tar.gz → 4!10.0.28000.2705__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- winrt_windows_system_threading-4!10.0.28000.2705/.gitignore +5 -0
- winrt_windows_system_threading-4!10.0.28000.2705/LICENSE +22 -0
- winrt_windows_system_threading-4!10.0.28000.2705/PKG-INFO +44 -0
- winrt_windows_system_threading-4!10.0.28000.2705/README.md +17 -0
- winrt_windows_system_threading-4!10.0.28000.2705/pyproject.toml +56 -0
- winrt_windows_system_threading-4!10.0.28000.2705/winrt/windows/system/threading/__init__.py +29 -0
- winrt_windows_system_threading-3.2.1/winrt/_winrt_windows_system_threading.pyi → winrt_windows_system_threading-4!10.0.28000.2705/winrt/windows/system/threading/__init__.pyi +52 -11
- winrt_windows_system_threading-4!10.0.28000.2705/winrt/windows/system/threading/_table.pywinrt.txt +105 -0
- winrt_windows_system_threading-3.2.1/PKG-INFO +0 -25
- winrt_windows_system_threading-3.2.1/README.md +0 -7
- winrt_windows_system_threading-3.2.1/all-requirements.txt +0 -3
- winrt_windows_system_threading-3.2.1/py.Windows.System.Threading.cpp +0 -643
- winrt_windows_system_threading-3.2.1/pyproject.toml +0 -47
- winrt_windows_system_threading-3.2.1/pywinrt-version.txt +0 -1
- winrt_windows_system_threading-3.2.1/requirements.txt +0 -3
- winrt_windows_system_threading-3.2.1/setup.cfg +0 -4
- winrt_windows_system_threading-3.2.1/setup.py +0 -33
- winrt_windows_system_threading-3.2.1/winrt/windows/system/threading/__init__.py +0 -37
- winrt_windows_system_threading-3.2.1/winrt_Windows.System.Threading.egg-info/PKG-INFO +0 -25
- winrt_windows_system_threading-3.2.1/winrt_Windows.System.Threading.egg-info/SOURCES.txt +0 -15
- winrt_windows_system_threading-3.2.1/winrt_Windows.System.Threading.egg-info/dependency_links.txt +0 -1
- winrt_windows_system_threading-3.2.1/winrt_Windows.System.Threading.egg-info/requires.txt +0 -4
- winrt_windows_system_threading-3.2.1/winrt_Windows.System.Threading.egg-info/top_level.txt +0 -1
- {winrt_windows_system_threading-3.2.1 → winrt_windows_system_threading-4!10.0.28000.2705}/winrt/windows/system/threading/py.typed +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
Copyright (c) 2021-2026 David Lechner <david@pybricks.com>
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: winrt-Windows.System.Threading
|
|
3
|
+
Version: 4!10.0.28000.2705
|
|
4
|
+
Summary: PyWinRT projection of the Windows.System.Threading namespace
|
|
5
|
+
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
6
|
+
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
7
|
+
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/projection/winrt/CHANGELOG.md
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
18
|
+
Classifier: Programming Language :: Python :: Free Threading :: 2 - Beta
|
|
19
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: winrt-runtime<5,>=4.0.0
|
|
23
|
+
Requires-Dist: winrt-windows-foundation>=4!10.0.28000.2705
|
|
24
|
+
Provides-Extra: all
|
|
25
|
+
Requires-Dist: winrt-windows-foundation[all]>=4!10.0.28000.2705; extra == 'all'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
29
|
+
|
|
30
|
+
# winrt-Windows.System.Threading
|
|
31
|
+
|
|
32
|
+
Windows Runtime (WinRT) APIs for the `Windows.System.Threading` namespace.
|
|
33
|
+
|
|
34
|
+
This package provides the `winrt.windows.system.threading` module.
|
|
35
|
+
|
|
36
|
+
The WinRT APIs in it are those of version 10.0.28000.2705 of the
|
|
37
|
+
`Microsoft.Windows.SDK.CPP` NuGet package.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
pip install winrt-Windows.System.Threading
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Other WinRT namespaces are packages of their own, so install the package of
|
|
44
|
+
each namespace your code imports from.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
+
|
|
3
|
+
# winrt-Windows.System.Threading
|
|
4
|
+
|
|
5
|
+
Windows Runtime (WinRT) APIs for the `Windows.System.Threading` namespace.
|
|
6
|
+
|
|
7
|
+
This package provides the `winrt.windows.system.threading` module.
|
|
8
|
+
|
|
9
|
+
The WinRT APIs in it are those of version 10.0.28000.2705 of the
|
|
10
|
+
`Microsoft.Windows.SDK.CPP` NuGet package.
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
pip install winrt-Windows.System.Threading
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Other WinRT namespaces are packages of their own, so install the package of
|
|
17
|
+
each namespace your code imports from.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
+
|
|
3
|
+
[build-system]
|
|
4
|
+
requires = ["hatchling", "winrt-table-compiler>=4.0.0,<5"]
|
|
5
|
+
build-backend = "hatchling.build"
|
|
6
|
+
|
|
7
|
+
[project]
|
|
8
|
+
name = "winrt-Windows.System.Threading"
|
|
9
|
+
version = "4!10.0.28000.2705"
|
|
10
|
+
description = "PyWinRT projection of the Windows.System.Threading namespace"
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
license = "MIT"
|
|
13
|
+
license-files = ["LICENSE"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Operating System :: Microsoft :: Windows",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
21
|
+
"Programming Language :: Python :: 3.15",
|
|
22
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
23
|
+
"Intended Audience :: Developers",
|
|
24
|
+
"Programming Language :: Python :: Free Threading :: 2 - Beta",
|
|
25
|
+
"Typing :: Typed",
|
|
26
|
+
]
|
|
27
|
+
requires-python = ">=3.11"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"winrt-runtime>=4.0.0,<5",
|
|
30
|
+
"winrt-Windows.Foundation>=4!10.0.28000.2705",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
all = [
|
|
35
|
+
"winrt-Windows.Foundation[all]>=4!10.0.28000.2705",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Documentation = "https://pywinrt.readthedocs.io"
|
|
40
|
+
Repository = "https://github.com/pywinrt/pywinrt"
|
|
41
|
+
Changelog = "https://github.com/pywinrt/pywinrt/blob/main/projection/winrt/CHANGELOG.md"
|
|
42
|
+
|
|
43
|
+
[tool.hatch.build.targets.sdist]
|
|
44
|
+
# The text form of the table is what the source distribution carries, and the
|
|
45
|
+
# compiled form is build output wherever it turns up. Hatchling reads no
|
|
46
|
+
# .gitignore above the package, so it has to be told about the latter.
|
|
47
|
+
only-include = ["winrt", "LICENSE", "README.md"]
|
|
48
|
+
exclude = ["**/_table.pywinrt"]
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.wheel]
|
|
51
|
+
packages = ["winrt"]
|
|
52
|
+
exclude = ["**/_table.pywinrt.txt"]
|
|
53
|
+
|
|
54
|
+
# winrt.table.build_hooks in winrt-table-compiler, which compiles each table
|
|
55
|
+
# the package carries and puts the result beside the __init__.py that loads it.
|
|
56
|
+
[tool.hatch.build.targets.wheel.hooks.winrt-table-compiler]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import winrt.runtime._internals
|
|
6
|
+
import winrt.system
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
import winrt.windows.foundation as windows_foundation
|
|
10
|
+
|
|
11
|
+
winrt.runtime._internals.load_projection(__spec__)
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"WorkItemOptions",
|
|
15
|
+
"WorkItemPriority",
|
|
16
|
+
"ThreadPool",
|
|
17
|
+
"ThreadPoolTimer",
|
|
18
|
+
"TimerDestroyedHandler",
|
|
19
|
+
"TimerElapsedHandler",
|
|
20
|
+
"WorkItemHandler",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
winrt.runtime._internals.alias_static_method(ThreadPool, "run_with_priority_and_options_async", "run_async")
|
|
24
|
+
winrt.runtime._internals.alias_static_method(ThreadPool, "run_with_priority_async", "run_async")
|
|
25
|
+
winrt.runtime._internals.alias_static_method(ThreadPoolTimer, "create_periodic_timer_with_completion", "create_periodic_timer")
|
|
26
|
+
winrt.runtime._internals.alias_static_method(ThreadPoolTimer, "create_timer_with_completion", "create_timer")
|
|
27
|
+
TimerDestroyedHandler = typing.Callable[[ThreadPoolTimer], object]
|
|
28
|
+
TimerElapsedHandler = typing.Callable[[ThreadPoolTimer], object]
|
|
29
|
+
WorkItemHandler = typing.Callable[["windows_foundation.IAsyncAction"], object]
|
|
@@ -1,47 +1,85 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
1
|
+
# WARNING: Please don't edit this file. It was generated by Python/WinRT
|
|
2
2
|
|
|
3
3
|
import datetime
|
|
4
|
-
import
|
|
5
|
-
import types
|
|
4
|
+
import enum
|
|
6
5
|
import typing
|
|
7
|
-
import uuid as _uuid
|
|
8
6
|
from builtins import property as _property
|
|
7
|
+
from typing_extensions import deprecated
|
|
9
8
|
|
|
10
|
-
import winrt._winrt
|
|
11
9
|
import winrt.system
|
|
12
10
|
import winrt.windows.foundation as windows_foundation
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
__all__ = [
|
|
13
|
+
"WorkItemOptions",
|
|
14
|
+
"WorkItemPriority",
|
|
15
|
+
"ThreadPool",
|
|
16
|
+
"ThreadPoolTimer",
|
|
17
|
+
"TimerDestroyedHandler",
|
|
18
|
+
"TimerElapsedHandler",
|
|
19
|
+
"WorkItemHandler",
|
|
20
|
+
]
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
class WorkItemOptions(enum.IntFlag):
|
|
23
|
+
NONE = 0x0
|
|
24
|
+
TIME_SLICED = 0x1
|
|
25
|
+
|
|
26
|
+
class WorkItemPriority(enum.IntEnum):
|
|
27
|
+
LOW = -1
|
|
28
|
+
NORMAL = 0
|
|
29
|
+
HIGH = 1
|
|
18
30
|
|
|
19
31
|
@typing.final
|
|
20
|
-
class ThreadPool_Static(winrt.
|
|
32
|
+
class ThreadPool_Static(winrt.system.Object_Static):
|
|
33
|
+
@typing.overload
|
|
21
34
|
# Windows.Foundation.IAsyncAction Windows.System.Threading.ThreadPool::RunAsync(Windows.System.Threading.WorkItemHandler)
|
|
22
35
|
def run_async(cls, handler: WorkItemHandler, /) -> windows_foundation.IAsyncAction: ...
|
|
36
|
+
@typing.overload
|
|
37
|
+
# Windows.Foundation.IAsyncAction Windows.System.Threading.ThreadPool::RunAsync(Windows.System.Threading.WorkItemHandler,Windows.System.Threading.WorkItemPriority)
|
|
38
|
+
def run_async(cls, handler: WorkItemHandler, priority: WorkItemPriority, /) -> windows_foundation.IAsyncAction: ...
|
|
39
|
+
@typing.overload
|
|
40
|
+
# Windows.Foundation.IAsyncAction Windows.System.Threading.ThreadPool::RunAsync(Windows.System.Threading.WorkItemHandler,Windows.System.Threading.WorkItemPriority,Windows.System.Threading.WorkItemOptions)
|
|
41
|
+
def run_async(cls, handler: WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions, /) -> windows_foundation.IAsyncAction: ...
|
|
42
|
+
# Deprecated alias of run_async() for pywinrt v3.x compatibility.
|
|
23
43
|
# Windows.Foundation.IAsyncAction Windows.System.Threading.ThreadPool::RunAsync(Windows.System.Threading.WorkItemHandler,Windows.System.Threading.WorkItemPriority,Windows.System.Threading.WorkItemOptions)
|
|
44
|
+
@deprecated("Use run_async() instead.")
|
|
24
45
|
def run_with_priority_and_options_async(cls, handler: WorkItemHandler, priority: WorkItemPriority, options: WorkItemOptions, /) -> windows_foundation.IAsyncAction: ...
|
|
46
|
+
# Deprecated alias of run_async() for pywinrt v3.x compatibility.
|
|
25
47
|
# Windows.Foundation.IAsyncAction Windows.System.Threading.ThreadPool::RunAsync(Windows.System.Threading.WorkItemHandler,Windows.System.Threading.WorkItemPriority)
|
|
48
|
+
@deprecated("Use run_async() instead.")
|
|
26
49
|
def run_with_priority_async(cls, handler: WorkItemHandler, priority: WorkItemPriority, /) -> windows_foundation.IAsyncAction: ...
|
|
27
50
|
|
|
28
51
|
@typing.final
|
|
29
52
|
class ThreadPool(winrt.system.Object, metaclass=ThreadPool_Static):
|
|
30
|
-
|
|
53
|
+
def __new__(cls, _: typing.Never, /) -> typing.Self:
|
|
54
|
+
"""A class of static members only, so there is nothing to create."""
|
|
31
55
|
|
|
32
56
|
@typing.final
|
|
33
|
-
class ThreadPoolTimer_Static(winrt.
|
|
57
|
+
class ThreadPoolTimer_Static(winrt.system.Object_Static):
|
|
58
|
+
@typing.overload
|
|
34
59
|
# Windows.System.Threading.ThreadPoolTimer Windows.System.Threading.ThreadPoolTimer::CreatePeriodicTimer(Windows.System.Threading.TimerElapsedHandler,Windows.Foundation.TimeSpan)
|
|
35
60
|
def create_periodic_timer(cls, handler: TimerElapsedHandler, period: datetime.timedelta, /) -> ThreadPoolTimer: ...
|
|
61
|
+
@typing.overload
|
|
36
62
|
# Windows.System.Threading.ThreadPoolTimer Windows.System.Threading.ThreadPoolTimer::CreatePeriodicTimer(Windows.System.Threading.TimerElapsedHandler,Windows.Foundation.TimeSpan,Windows.System.Threading.TimerDestroyedHandler)
|
|
63
|
+
def create_periodic_timer(cls, handler: TimerElapsedHandler, period: datetime.timedelta, destroyed: TimerDestroyedHandler, /) -> ThreadPoolTimer: ...
|
|
64
|
+
# Deprecated alias of create_periodic_timer() for pywinrt v3.x compatibility.
|
|
65
|
+
# Windows.System.Threading.ThreadPoolTimer Windows.System.Threading.ThreadPoolTimer::CreatePeriodicTimer(Windows.System.Threading.TimerElapsedHandler,Windows.Foundation.TimeSpan,Windows.System.Threading.TimerDestroyedHandler)
|
|
66
|
+
@deprecated("Use create_periodic_timer() instead.")
|
|
37
67
|
def create_periodic_timer_with_completion(cls, handler: TimerElapsedHandler, period: datetime.timedelta, destroyed: TimerDestroyedHandler, /) -> ThreadPoolTimer: ...
|
|
68
|
+
@typing.overload
|
|
38
69
|
# Windows.System.Threading.ThreadPoolTimer Windows.System.Threading.ThreadPoolTimer::CreateTimer(Windows.System.Threading.TimerElapsedHandler,Windows.Foundation.TimeSpan)
|
|
39
70
|
def create_timer(cls, handler: TimerElapsedHandler, delay: datetime.timedelta, /) -> ThreadPoolTimer: ...
|
|
71
|
+
@typing.overload
|
|
72
|
+
# Windows.System.Threading.ThreadPoolTimer Windows.System.Threading.ThreadPoolTimer::CreateTimer(Windows.System.Threading.TimerElapsedHandler,Windows.Foundation.TimeSpan,Windows.System.Threading.TimerDestroyedHandler)
|
|
73
|
+
def create_timer(cls, handler: TimerElapsedHandler, delay: datetime.timedelta, destroyed: TimerDestroyedHandler, /) -> ThreadPoolTimer: ...
|
|
74
|
+
# Deprecated alias of create_timer() for pywinrt v3.x compatibility.
|
|
40
75
|
# Windows.System.Threading.ThreadPoolTimer Windows.System.Threading.ThreadPoolTimer::CreateTimer(Windows.System.Threading.TimerElapsedHandler,Windows.Foundation.TimeSpan,Windows.System.Threading.TimerDestroyedHandler)
|
|
76
|
+
@deprecated("Use create_timer() instead.")
|
|
41
77
|
def create_timer_with_completion(cls, handler: TimerElapsedHandler, delay: datetime.timedelta, destroyed: TimerDestroyedHandler, /) -> ThreadPoolTimer: ...
|
|
42
78
|
|
|
43
79
|
@typing.final
|
|
44
80
|
class ThreadPoolTimer(winrt.system.Object, metaclass=ThreadPoolTimer_Static):
|
|
81
|
+
def __new__(cls, _: typing.Never, /) -> typing.Self:
|
|
82
|
+
"""WinRT gives this class no constructor; an instance comes from a method or property that returns one."""
|
|
45
83
|
# System.Void Windows.System.Threading.ThreadPoolTimer::Cancel()
|
|
46
84
|
def cancel(self) -> None: ...
|
|
47
85
|
# Windows.Foundation.TimeSpan Windows.System.Threading.ThreadPoolTimer::get_Delay()
|
|
@@ -51,3 +89,6 @@ class ThreadPoolTimer(winrt.system.Object, metaclass=ThreadPoolTimer_Static):
|
|
|
51
89
|
@_property
|
|
52
90
|
def period(self) -> datetime.timedelta: ...
|
|
53
91
|
|
|
92
|
+
type TimerDestroyedHandler = typing.Callable[[ThreadPoolTimer], object]
|
|
93
|
+
type TimerElapsedHandler = typing.Callable[[ThreadPoolTimer], object]
|
|
94
|
+
type WorkItemHandler = typing.Callable[[windows_foundation.IAsyncAction], object]
|
winrt_windows_system_threading-4!10.0.28000.2705/winrt/windows/system/threading/_table.pywinrt.txt
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
format 4.0
|
|
2
|
+
census 2e30db26-66c8-4551-85b9-a537376d8f99 1
|
|
3
|
+
namespace Windows.System.Threading
|
|
4
|
+
|
|
5
|
+
interface Windows.System.Threading.IThreadPoolStatics
|
|
6
|
+
guid b6bf67dd-84bd-44f8-ac1c-93ebcb9dba91
|
|
7
|
+
|
|
8
|
+
interface Windows.System.Threading.IThreadPoolTimer
|
|
9
|
+
guid 594ebe78-55ea-4a88-a50d-3402ae1f9cf2
|
|
10
|
+
|
|
11
|
+
interface Windows.System.Threading.IThreadPoolTimerStatics
|
|
12
|
+
guid 1a8a9d02-e482-461b-b8c7-8efad1cce590
|
|
13
|
+
|
|
14
|
+
class Windows.System.Threading.ThreadPool static python_type
|
|
15
|
+
py ThreadPool
|
|
16
|
+
factory Windows.System.Threading.IThreadPoolStatics
|
|
17
|
+
method run_async static
|
|
18
|
+
method RunAsync slot=6 inputs=1 outputs=1 declaring=Windows.System.Threading.IThreadPoolStatics shape=51 static
|
|
19
|
+
in delegate type=Windows.System.Threading.WorkItemHandler name=handler
|
|
20
|
+
out interface type=Windows.Foundation.IAsyncAction return
|
|
21
|
+
method RunAsync slot=7 inputs=2 outputs=1 declaring=Windows.System.Threading.IThreadPoolStatics shape=117 static
|
|
22
|
+
in delegate type=Windows.System.Threading.WorkItemHandler name=handler
|
|
23
|
+
in enum32 type=Windows.System.Threading.WorkItemPriority name=priority
|
|
24
|
+
out interface type=Windows.Foundation.IAsyncAction return
|
|
25
|
+
method RunAsync slot=8 inputs=3 outputs=1 declaring=Windows.System.Threading.IThreadPoolStatics shape=195 static
|
|
26
|
+
in delegate type=Windows.System.Threading.WorkItemHandler name=handler
|
|
27
|
+
in enum32 type=Windows.System.Threading.WorkItemPriority name=priority
|
|
28
|
+
in enum_u32 type=Windows.System.Threading.WorkItemOptions name=options
|
|
29
|
+
out interface type=Windows.Foundation.IAsyncAction return
|
|
30
|
+
|
|
31
|
+
class Windows.System.Threading.ThreadPoolTimer python_type
|
|
32
|
+
py ThreadPoolTimer
|
|
33
|
+
signature rc(Windows.System.Threading.ThreadPoolTimer;{594ebe78-55ea-4a88-a50d-3402ae1f9cf2})
|
|
34
|
+
default Windows.System.Threading.IThreadPoolTimer
|
|
35
|
+
requires Windows.System.Threading.IThreadPoolTimer
|
|
36
|
+
factory Windows.System.Threading.IThreadPoolTimerStatics
|
|
37
|
+
property delay
|
|
38
|
+
get get_Delay slot=7 inputs=0 outputs=1 declaring=Windows.System.Threading.IThreadPoolTimer shape=4
|
|
39
|
+
out timespan return
|
|
40
|
+
property period
|
|
41
|
+
get get_Period slot=6 inputs=0 outputs=1 declaring=Windows.System.Threading.IThreadPoolTimer shape=4
|
|
42
|
+
out timespan return
|
|
43
|
+
method cancel
|
|
44
|
+
method Cancel slot=8 inputs=0 outputs=0 declaring=Windows.System.Threading.IThreadPoolTimer shape=0
|
|
45
|
+
method create_periodic_timer static
|
|
46
|
+
method CreatePeriodicTimer slot=6 inputs=2 outputs=1 declaring=Windows.System.Threading.IThreadPoolTimerStatics shape=135 static
|
|
47
|
+
in delegate type=Windows.System.Threading.TimerElapsedHandler name=handler
|
|
48
|
+
in timespan name=period
|
|
49
|
+
out class type=Windows.System.Threading.ThreadPoolTimer return
|
|
50
|
+
method CreatePeriodicTimer slot=8 inputs=3 outputs=1 declaring=Windows.System.Threading.IThreadPoolTimerStatics shape=213 static
|
|
51
|
+
in delegate type=Windows.System.Threading.TimerElapsedHandler name=handler
|
|
52
|
+
in timespan name=period
|
|
53
|
+
in delegate type=Windows.System.Threading.TimerDestroyedHandler name=destroyed
|
|
54
|
+
out class type=Windows.System.Threading.ThreadPoolTimer return
|
|
55
|
+
method create_timer static
|
|
56
|
+
method CreateTimer slot=7 inputs=2 outputs=1 declaring=Windows.System.Threading.IThreadPoolTimerStatics shape=135 static
|
|
57
|
+
in delegate type=Windows.System.Threading.TimerElapsedHandler name=handler
|
|
58
|
+
in timespan name=delay
|
|
59
|
+
out class type=Windows.System.Threading.ThreadPoolTimer return
|
|
60
|
+
method CreateTimer slot=9 inputs=3 outputs=1 declaring=Windows.System.Threading.IThreadPoolTimerStatics shape=213 static
|
|
61
|
+
in delegate type=Windows.System.Threading.TimerElapsedHandler name=handler
|
|
62
|
+
in timespan name=delay
|
|
63
|
+
in delegate type=Windows.System.Threading.TimerDestroyedHandler name=destroyed
|
|
64
|
+
out class type=Windows.System.Threading.ThreadPoolTimer return
|
|
65
|
+
|
|
66
|
+
delegate Windows.System.Threading.TimerDestroyedHandler python_type
|
|
67
|
+
py TimerDestroyedHandler
|
|
68
|
+
guid 34ed19fa-8384-4eb9-8209-fb5094eeec35
|
|
69
|
+
signature delegate({34ed19fa-8384-4eb9-8209-fb5094eeec35})
|
|
70
|
+
method -
|
|
71
|
+
method Invoke slot=3 inputs=1 outputs=0 shape=4 reverse=1
|
|
72
|
+
in class type=Windows.System.Threading.ThreadPoolTimer name=timer
|
|
73
|
+
|
|
74
|
+
delegate Windows.System.Threading.TimerElapsedHandler python_type
|
|
75
|
+
py TimerElapsedHandler
|
|
76
|
+
guid faaea667-fbeb-49cb-adb2-71184c556e43
|
|
77
|
+
signature delegate({faaea667-fbeb-49cb-adb2-71184c556e43})
|
|
78
|
+
method -
|
|
79
|
+
method Invoke slot=3 inputs=1 outputs=0 shape=4 reverse=1
|
|
80
|
+
in class type=Windows.System.Threading.ThreadPoolTimer name=timer
|
|
81
|
+
|
|
82
|
+
delegate Windows.System.Threading.WorkItemHandler python_type
|
|
83
|
+
py WorkItemHandler
|
|
84
|
+
guid 1d1a8b8b-fa66-414f-9cbd-b65fc99d17fa
|
|
85
|
+
signature delegate({1d1a8b8b-fa66-414f-9cbd-b65fc99d17fa})
|
|
86
|
+
method -
|
|
87
|
+
method Invoke slot=3 inputs=1 outputs=0 shape=4 reverse=1
|
|
88
|
+
in interface type=Windows.Foundation.IAsyncAction name=operation
|
|
89
|
+
|
|
90
|
+
enum Windows.System.Threading.WorkItemOptions python_type flags_enum
|
|
91
|
+
py WorkItemOptions
|
|
92
|
+
signature enum(Windows.System.Threading.WorkItemOptions;u4)
|
|
93
|
+
constant NONE 0x0
|
|
94
|
+
constant TIME_SLICED 0x1
|
|
95
|
+
|
|
96
|
+
enum Windows.System.Threading.WorkItemPriority python_type
|
|
97
|
+
py WorkItemPriority
|
|
98
|
+
signature enum(Windows.System.Threading.WorkItemPriority;i4)
|
|
99
|
+
constant LOW -1
|
|
100
|
+
constant NORMAL 0
|
|
101
|
+
constant HIGH 1
|
|
102
|
+
|
|
103
|
+
interface Windows.Foundation.IAsyncAction external
|
|
104
|
+
py winrt.windows.foundation._IAsyncAction
|
|
105
|
+
guid 5a648006-843a-4da9-865b-9d26e5dfad7b
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: winrt-Windows.System.Threading
|
|
3
|
-
Version: 3.2.1
|
|
4
|
-
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
-
License-Expression: MIT
|
|
6
|
-
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
7
|
-
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
8
|
-
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
9
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime~=3.2.1.0
|
|
16
|
-
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]~=3.2.1.0; extra == "all"
|
|
18
|
-
|
|
19
|
-
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
20
|
-
|
|
21
|
-
# winrt-Windows.System.Threading
|
|
22
|
-
|
|
23
|
-
Windows Runtime (WinRT) APIs for for the `Windows.System.Threading` namespace.
|
|
24
|
-
|
|
25
|
-
This package provides the `winrt.windows.system.threading` module.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
2
|
-
|
|
3
|
-
# winrt-Windows.System.Threading
|
|
4
|
-
|
|
5
|
-
Windows Runtime (WinRT) APIs for for the `Windows.System.Threading` namespace.
|
|
6
|
-
|
|
7
|
-
This package provides the `winrt.windows.system.threading` module.
|
|
@@ -1,643 +0,0 @@
|
|
|
1
|
-
// WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.1
|
|
2
|
-
|
|
3
|
-
#include "py.Windows.System.Threading.h"
|
|
4
|
-
|
|
5
|
-
namespace py::cpp::Windows::System::Threading
|
|
6
|
-
{
|
|
7
|
-
// ----- ThreadPool class --------------------
|
|
8
|
-
|
|
9
|
-
static PyObject* _new_ThreadPool(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
10
|
-
{
|
|
11
|
-
static_assert(py::py_type<winrt::Windows::System::Threading::ThreadPool>::type_name);
|
|
12
|
-
py::set_invalid_activation_error(py::py_type<winrt::Windows::System::Threading::ThreadPool>::type_name);
|
|
13
|
-
return nullptr;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
static PyObject* ThreadPool_RunAsync(PyObject* /*unused*/, PyObject* args) noexcept
|
|
17
|
-
{
|
|
18
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
19
|
-
|
|
20
|
-
if (arg_count == 1)
|
|
21
|
-
{
|
|
22
|
-
try
|
|
23
|
-
{
|
|
24
|
-
static std::optional<bool> is_overload_present{};
|
|
25
|
-
|
|
26
|
-
if (!is_overload_present.has_value())
|
|
27
|
-
{
|
|
28
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 1);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (!is_overload_present.value())
|
|
32
|
-
{
|
|
33
|
-
py::set_arg_count_version_error(1);
|
|
34
|
-
return nullptr;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::WorkItemHandler>(args, 0);
|
|
38
|
-
|
|
39
|
-
return py::convert([&]()
|
|
40
|
-
{
|
|
41
|
-
auto _gil = release_gil();
|
|
42
|
-
return winrt::Windows::System::Threading::ThreadPool::RunAsync(param0);
|
|
43
|
-
}());
|
|
44
|
-
}
|
|
45
|
-
catch (...)
|
|
46
|
-
{
|
|
47
|
-
py::to_PyErr();
|
|
48
|
-
return nullptr;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else
|
|
52
|
-
{
|
|
53
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
54
|
-
return nullptr;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
static PyObject* ThreadPool_RunWithPriorityAndOptionsAsync(PyObject* /*unused*/, PyObject* args) noexcept
|
|
59
|
-
{
|
|
60
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
61
|
-
|
|
62
|
-
if (arg_count == 3)
|
|
63
|
-
{
|
|
64
|
-
try
|
|
65
|
-
{
|
|
66
|
-
static std::optional<bool> is_overload_present{};
|
|
67
|
-
|
|
68
|
-
if (!is_overload_present.has_value())
|
|
69
|
-
{
|
|
70
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 3);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (!is_overload_present.value())
|
|
74
|
-
{
|
|
75
|
-
py::set_arg_count_version_error(3);
|
|
76
|
-
return nullptr;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::WorkItemHandler>(args, 0);
|
|
80
|
-
auto param1 = py::convert_to<winrt::Windows::System::Threading::WorkItemPriority>(args, 1);
|
|
81
|
-
auto param2 = py::convert_to<winrt::Windows::System::Threading::WorkItemOptions>(args, 2);
|
|
82
|
-
|
|
83
|
-
return py::convert([&]()
|
|
84
|
-
{
|
|
85
|
-
auto _gil = release_gil();
|
|
86
|
-
return winrt::Windows::System::Threading::ThreadPool::RunAsync(param0, param1, param2);
|
|
87
|
-
}());
|
|
88
|
-
}
|
|
89
|
-
catch (...)
|
|
90
|
-
{
|
|
91
|
-
py::to_PyErr();
|
|
92
|
-
return nullptr;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else
|
|
96
|
-
{
|
|
97
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
98
|
-
return nullptr;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
static PyObject* ThreadPool_RunWithPriorityAsync(PyObject* /*unused*/, PyObject* args) noexcept
|
|
103
|
-
{
|
|
104
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
105
|
-
|
|
106
|
-
if (arg_count == 2)
|
|
107
|
-
{
|
|
108
|
-
try
|
|
109
|
-
{
|
|
110
|
-
static std::optional<bool> is_overload_present{};
|
|
111
|
-
|
|
112
|
-
if (!is_overload_present.has_value())
|
|
113
|
-
{
|
|
114
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPool", L"RunAsync", 2);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (!is_overload_present.value())
|
|
118
|
-
{
|
|
119
|
-
py::set_arg_count_version_error(2);
|
|
120
|
-
return nullptr;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::WorkItemHandler>(args, 0);
|
|
124
|
-
auto param1 = py::convert_to<winrt::Windows::System::Threading::WorkItemPriority>(args, 1);
|
|
125
|
-
|
|
126
|
-
return py::convert([&]()
|
|
127
|
-
{
|
|
128
|
-
auto _gil = release_gil();
|
|
129
|
-
return winrt::Windows::System::Threading::ThreadPool::RunAsync(param0, param1);
|
|
130
|
-
}());
|
|
131
|
-
}
|
|
132
|
-
catch (...)
|
|
133
|
-
{
|
|
134
|
-
py::to_PyErr();
|
|
135
|
-
return nullptr;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
else
|
|
139
|
-
{
|
|
140
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
141
|
-
return nullptr;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
static PyMethodDef _methods_ThreadPool[] = {
|
|
146
|
-
{ }};
|
|
147
|
-
|
|
148
|
-
static PyGetSetDef _getset_ThreadPool[] = {
|
|
149
|
-
{ }};
|
|
150
|
-
|
|
151
|
-
static PyType_Slot _type_slots_ThreadPool[] = {
|
|
152
|
-
{ Py_tp_new, reinterpret_cast<void*>(_new_ThreadPool) },
|
|
153
|
-
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ThreadPool) },
|
|
154
|
-
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ThreadPool) },
|
|
155
|
-
{ }};
|
|
156
|
-
|
|
157
|
-
static PyType_Spec type_spec_ThreadPool = {
|
|
158
|
-
"winrt._winrt_windows_system_threading.ThreadPool",
|
|
159
|
-
0,
|
|
160
|
-
0,
|
|
161
|
-
Py_TPFLAGS_DEFAULT,
|
|
162
|
-
_type_slots_ThreadPool};
|
|
163
|
-
|
|
164
|
-
static PyGetSetDef getset_ThreadPool_Static[] = {
|
|
165
|
-
{ }};
|
|
166
|
-
|
|
167
|
-
static PyMethodDef methods_ThreadPool_Static[] = {
|
|
168
|
-
{ "run_async", reinterpret_cast<PyCFunction>(ThreadPool_RunAsync), METH_VARARGS, nullptr },
|
|
169
|
-
{ "run_with_priority_and_options_async", reinterpret_cast<PyCFunction>(ThreadPool_RunWithPriorityAndOptionsAsync), METH_VARARGS, nullptr },
|
|
170
|
-
{ "run_with_priority_async", reinterpret_cast<PyCFunction>(ThreadPool_RunWithPriorityAsync), METH_VARARGS, nullptr },
|
|
171
|
-
{ }};
|
|
172
|
-
|
|
173
|
-
static PyType_Slot type_slots_ThreadPool_Static[] =
|
|
174
|
-
{
|
|
175
|
-
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
176
|
-
{ Py_tp_getset, reinterpret_cast<void*>(getset_ThreadPool_Static) },
|
|
177
|
-
{ Py_tp_methods, reinterpret_cast<void*>(methods_ThreadPool_Static) },
|
|
178
|
-
{ }
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
static PyType_Spec type_spec_ThreadPool_Static = {
|
|
182
|
-
"winrt._winrt_windows_system_threading.ThreadPool_Static",
|
|
183
|
-
static_cast<int>(PyType_Type.tp_basicsize),
|
|
184
|
-
static_cast<int>(PyType_Type.tp_itemsize),
|
|
185
|
-
Py_TPFLAGS_DEFAULT,
|
|
186
|
-
type_slots_ThreadPool_Static};
|
|
187
|
-
|
|
188
|
-
// ----- ThreadPoolTimer class --------------------
|
|
189
|
-
|
|
190
|
-
static PyObject* _new_ThreadPoolTimer(PyTypeObject* /*unused*/, PyObject* /*unused*/, PyObject* /*unused*/) noexcept
|
|
191
|
-
{
|
|
192
|
-
static_assert(py::py_type<winrt::Windows::System::Threading::ThreadPoolTimer>::type_name);
|
|
193
|
-
py::set_invalid_activation_error(py::py_type<winrt::Windows::System::Threading::ThreadPoolTimer>::type_name);
|
|
194
|
-
return nullptr;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
static void _dealloc_ThreadPoolTimer(py::wrapper::Windows::System::Threading::ThreadPoolTimer* self) noexcept
|
|
198
|
-
{
|
|
199
|
-
auto tp = Py_TYPE(self);
|
|
200
|
-
std::destroy_at(&self->obj);
|
|
201
|
-
tp->tp_free(self);
|
|
202
|
-
Py_DECREF(tp);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
static PyObject* ThreadPoolTimer_Cancel(py::wrapper::Windows::System::Threading::ThreadPoolTimer* self, PyObject* args) noexcept
|
|
206
|
-
{
|
|
207
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
208
|
-
|
|
209
|
-
if (arg_count == 0)
|
|
210
|
-
{
|
|
211
|
-
try
|
|
212
|
-
{
|
|
213
|
-
static std::optional<bool> is_overload_present{};
|
|
214
|
-
|
|
215
|
-
if (!is_overload_present.has_value())
|
|
216
|
-
{
|
|
217
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Cancel", 0);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
if (!is_overload_present.value())
|
|
221
|
-
{
|
|
222
|
-
py::set_arg_count_version_error(0);
|
|
223
|
-
return nullptr;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
{
|
|
227
|
-
auto _gil = release_gil();
|
|
228
|
-
self->obj.Cancel();
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
Py_RETURN_NONE;
|
|
232
|
-
}
|
|
233
|
-
catch (...)
|
|
234
|
-
{
|
|
235
|
-
py::to_PyErr();
|
|
236
|
-
return nullptr;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
else
|
|
240
|
-
{
|
|
241
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
242
|
-
return nullptr;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
static PyObject* ThreadPoolTimer_CreatePeriodicTimer(PyObject* /*unused*/, PyObject* args) noexcept
|
|
247
|
-
{
|
|
248
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
249
|
-
|
|
250
|
-
if (arg_count == 2)
|
|
251
|
-
{
|
|
252
|
-
try
|
|
253
|
-
{
|
|
254
|
-
static std::optional<bool> is_overload_present{};
|
|
255
|
-
|
|
256
|
-
if (!is_overload_present.has_value())
|
|
257
|
-
{
|
|
258
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreatePeriodicTimer", 2);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
if (!is_overload_present.value())
|
|
262
|
-
{
|
|
263
|
-
py::set_arg_count_version_error(2);
|
|
264
|
-
return nullptr;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
|
|
268
|
-
auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
|
|
269
|
-
|
|
270
|
-
return py::convert([&]()
|
|
271
|
-
{
|
|
272
|
-
auto _gil = release_gil();
|
|
273
|
-
return winrt::Windows::System::Threading::ThreadPoolTimer::CreatePeriodicTimer(param0, param1);
|
|
274
|
-
}());
|
|
275
|
-
}
|
|
276
|
-
catch (...)
|
|
277
|
-
{
|
|
278
|
-
py::to_PyErr();
|
|
279
|
-
return nullptr;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
else
|
|
283
|
-
{
|
|
284
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
285
|
-
return nullptr;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
static PyObject* ThreadPoolTimer_CreatePeriodicTimerWithCompletion(PyObject* /*unused*/, PyObject* args) noexcept
|
|
290
|
-
{
|
|
291
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
292
|
-
|
|
293
|
-
if (arg_count == 3)
|
|
294
|
-
{
|
|
295
|
-
try
|
|
296
|
-
{
|
|
297
|
-
static std::optional<bool> is_overload_present{};
|
|
298
|
-
|
|
299
|
-
if (!is_overload_present.has_value())
|
|
300
|
-
{
|
|
301
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreatePeriodicTimer", 3);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (!is_overload_present.value())
|
|
305
|
-
{
|
|
306
|
-
py::set_arg_count_version_error(3);
|
|
307
|
-
return nullptr;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
|
|
311
|
-
auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
|
|
312
|
-
auto param2 = py::convert_to<winrt::Windows::System::Threading::TimerDestroyedHandler>(args, 2);
|
|
313
|
-
|
|
314
|
-
return py::convert([&]()
|
|
315
|
-
{
|
|
316
|
-
auto _gil = release_gil();
|
|
317
|
-
return winrt::Windows::System::Threading::ThreadPoolTimer::CreatePeriodicTimer(param0, param1, param2);
|
|
318
|
-
}());
|
|
319
|
-
}
|
|
320
|
-
catch (...)
|
|
321
|
-
{
|
|
322
|
-
py::to_PyErr();
|
|
323
|
-
return nullptr;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
else
|
|
327
|
-
{
|
|
328
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
329
|
-
return nullptr;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
static PyObject* ThreadPoolTimer_CreateTimer(PyObject* /*unused*/, PyObject* args) noexcept
|
|
334
|
-
{
|
|
335
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
336
|
-
|
|
337
|
-
if (arg_count == 2)
|
|
338
|
-
{
|
|
339
|
-
try
|
|
340
|
-
{
|
|
341
|
-
static std::optional<bool> is_overload_present{};
|
|
342
|
-
|
|
343
|
-
if (!is_overload_present.has_value())
|
|
344
|
-
{
|
|
345
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreateTimer", 2);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
if (!is_overload_present.value())
|
|
349
|
-
{
|
|
350
|
-
py::set_arg_count_version_error(2);
|
|
351
|
-
return nullptr;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
|
|
355
|
-
auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
|
|
356
|
-
|
|
357
|
-
return py::convert([&]()
|
|
358
|
-
{
|
|
359
|
-
auto _gil = release_gil();
|
|
360
|
-
return winrt::Windows::System::Threading::ThreadPoolTimer::CreateTimer(param0, param1);
|
|
361
|
-
}());
|
|
362
|
-
}
|
|
363
|
-
catch (...)
|
|
364
|
-
{
|
|
365
|
-
py::to_PyErr();
|
|
366
|
-
return nullptr;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
else
|
|
370
|
-
{
|
|
371
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
372
|
-
return nullptr;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
static PyObject* ThreadPoolTimer_CreateTimerWithCompletion(PyObject* /*unused*/, PyObject* args) noexcept
|
|
377
|
-
{
|
|
378
|
-
auto arg_count = PyTuple_GET_SIZE(args);
|
|
379
|
-
|
|
380
|
-
if (arg_count == 3)
|
|
381
|
-
{
|
|
382
|
-
try
|
|
383
|
-
{
|
|
384
|
-
static std::optional<bool> is_overload_present{};
|
|
385
|
-
|
|
386
|
-
if (!is_overload_present.has_value())
|
|
387
|
-
{
|
|
388
|
-
is_overload_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsMethodPresent(L"Windows.System.Threading.ThreadPoolTimer", L"CreateTimer", 3);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
if (!is_overload_present.value())
|
|
392
|
-
{
|
|
393
|
-
py::set_arg_count_version_error(3);
|
|
394
|
-
return nullptr;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
auto param0 = py::convert_to<winrt::Windows::System::Threading::TimerElapsedHandler>(args, 0);
|
|
398
|
-
auto param1 = py::convert_to<winrt::Windows::Foundation::TimeSpan>(args, 1);
|
|
399
|
-
auto param2 = py::convert_to<winrt::Windows::System::Threading::TimerDestroyedHandler>(args, 2);
|
|
400
|
-
|
|
401
|
-
return py::convert([&]()
|
|
402
|
-
{
|
|
403
|
-
auto _gil = release_gil();
|
|
404
|
-
return winrt::Windows::System::Threading::ThreadPoolTimer::CreateTimer(param0, param1, param2);
|
|
405
|
-
}());
|
|
406
|
-
}
|
|
407
|
-
catch (...)
|
|
408
|
-
{
|
|
409
|
-
py::to_PyErr();
|
|
410
|
-
return nullptr;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
else
|
|
414
|
-
{
|
|
415
|
-
py::set_invalid_arg_count_error(arg_count);
|
|
416
|
-
return nullptr;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
static PyObject* ThreadPoolTimer_get_Delay(py::wrapper::Windows::System::Threading::ThreadPoolTimer* self, void* /*unused*/) noexcept
|
|
421
|
-
{
|
|
422
|
-
try
|
|
423
|
-
{
|
|
424
|
-
static std::optional<bool> is_property_present{};
|
|
425
|
-
|
|
426
|
-
if (!is_property_present.has_value())
|
|
427
|
-
{
|
|
428
|
-
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Delay");
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
if (!is_property_present.value())
|
|
432
|
-
{
|
|
433
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
434
|
-
return nullptr;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
return py::convert([&]()
|
|
438
|
-
{
|
|
439
|
-
auto _gil = release_gil();
|
|
440
|
-
return self->obj.Delay();
|
|
441
|
-
}());
|
|
442
|
-
}
|
|
443
|
-
catch (...)
|
|
444
|
-
{
|
|
445
|
-
py::to_PyErr();
|
|
446
|
-
return nullptr;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
static PyObject* ThreadPoolTimer_get_Period(py::wrapper::Windows::System::Threading::ThreadPoolTimer* self, void* /*unused*/) noexcept
|
|
451
|
-
{
|
|
452
|
-
try
|
|
453
|
-
{
|
|
454
|
-
static std::optional<bool> is_property_present{};
|
|
455
|
-
|
|
456
|
-
if (!is_property_present.has_value())
|
|
457
|
-
{
|
|
458
|
-
is_property_present = winrt::Windows::Foundation::Metadata::ApiInformation::IsPropertyPresent(L"Windows.System.Threading.ThreadPoolTimer", L"Period");
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
if (!is_property_present.value())
|
|
462
|
-
{
|
|
463
|
-
PyErr_SetString(PyExc_AttributeError, "property is not available in this version of Windows");
|
|
464
|
-
return nullptr;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
return py::convert([&]()
|
|
468
|
-
{
|
|
469
|
-
auto _gil = release_gil();
|
|
470
|
-
return self->obj.Period();
|
|
471
|
-
}());
|
|
472
|
-
}
|
|
473
|
-
catch (...)
|
|
474
|
-
{
|
|
475
|
-
py::to_PyErr();
|
|
476
|
-
return nullptr;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
static PyObject* _assign_array_ThreadPoolTimer(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
481
|
-
{
|
|
482
|
-
auto array = std::make_unique<py::ComArray<winrt::Windows::System::Threading::ThreadPoolTimer>>();
|
|
483
|
-
if (!py::cpp::_winrt::Array_Assign(arg, std::move(array)))
|
|
484
|
-
{
|
|
485
|
-
return nullptr;
|
|
486
|
-
}
|
|
487
|
-
Py_RETURN_NONE;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
static PyObject* _from_ThreadPoolTimer(PyObject* /*unused*/, PyObject* arg) noexcept
|
|
491
|
-
{
|
|
492
|
-
try
|
|
493
|
-
{
|
|
494
|
-
auto return_value = py::convert_to<winrt::Windows::Foundation::IInspectable>(arg);
|
|
495
|
-
return py::convert(return_value.as<winrt::Windows::System::Threading::ThreadPoolTimer>());
|
|
496
|
-
}
|
|
497
|
-
catch (...)
|
|
498
|
-
{
|
|
499
|
-
py::to_PyErr();
|
|
500
|
-
return nullptr;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
static PyMethodDef _methods_ThreadPoolTimer[] = {
|
|
505
|
-
{ "cancel", reinterpret_cast<PyCFunction>(ThreadPoolTimer_Cancel), METH_VARARGS, nullptr },
|
|
506
|
-
{ "_assign_array_", _assign_array_ThreadPoolTimer, METH_O | METH_STATIC, nullptr },
|
|
507
|
-
{ "_from", reinterpret_cast<PyCFunction>(_from_ThreadPoolTimer), METH_O | METH_STATIC, nullptr },
|
|
508
|
-
{ }};
|
|
509
|
-
|
|
510
|
-
static PyGetSetDef _getset_ThreadPoolTimer[] = {
|
|
511
|
-
{ "delay", reinterpret_cast<getter>(ThreadPoolTimer_get_Delay), nullptr, nullptr, nullptr },
|
|
512
|
-
{ "period", reinterpret_cast<getter>(ThreadPoolTimer_get_Period), nullptr, nullptr, nullptr },
|
|
513
|
-
{ }};
|
|
514
|
-
|
|
515
|
-
static PyType_Slot _type_slots_ThreadPoolTimer[] = {
|
|
516
|
-
{ Py_tp_new, reinterpret_cast<void*>(_new_ThreadPoolTimer) },
|
|
517
|
-
{ Py_tp_dealloc, reinterpret_cast<void*>(_dealloc_ThreadPoolTimer) },
|
|
518
|
-
{ Py_tp_methods, reinterpret_cast<void*>(_methods_ThreadPoolTimer) },
|
|
519
|
-
{ Py_tp_getset, reinterpret_cast<void*>(_getset_ThreadPoolTimer) },
|
|
520
|
-
{ }};
|
|
521
|
-
|
|
522
|
-
static PyType_Spec type_spec_ThreadPoolTimer = {
|
|
523
|
-
"winrt._winrt_windows_system_threading.ThreadPoolTimer",
|
|
524
|
-
sizeof(py::wrapper::Windows::System::Threading::ThreadPoolTimer),
|
|
525
|
-
0,
|
|
526
|
-
Py_TPFLAGS_DEFAULT,
|
|
527
|
-
_type_slots_ThreadPoolTimer};
|
|
528
|
-
|
|
529
|
-
static PyGetSetDef getset_ThreadPoolTimer_Static[] = {
|
|
530
|
-
{ }};
|
|
531
|
-
|
|
532
|
-
static PyMethodDef methods_ThreadPoolTimer_Static[] = {
|
|
533
|
-
{ "create_periodic_timer", reinterpret_cast<PyCFunction>(ThreadPoolTimer_CreatePeriodicTimer), METH_VARARGS, nullptr },
|
|
534
|
-
{ "create_periodic_timer_with_completion", reinterpret_cast<PyCFunction>(ThreadPoolTimer_CreatePeriodicTimerWithCompletion), METH_VARARGS, nullptr },
|
|
535
|
-
{ "create_timer", reinterpret_cast<PyCFunction>(ThreadPoolTimer_CreateTimer), METH_VARARGS, nullptr },
|
|
536
|
-
{ "create_timer_with_completion", reinterpret_cast<PyCFunction>(ThreadPoolTimer_CreateTimerWithCompletion), METH_VARARGS, nullptr },
|
|
537
|
-
{ }};
|
|
538
|
-
|
|
539
|
-
static PyType_Slot type_slots_ThreadPoolTimer_Static[] =
|
|
540
|
-
{
|
|
541
|
-
{ Py_tp_base, reinterpret_cast<void*>(&PyType_Type) },
|
|
542
|
-
{ Py_tp_getset, reinterpret_cast<void*>(getset_ThreadPoolTimer_Static) },
|
|
543
|
-
{ Py_tp_methods, reinterpret_cast<void*>(methods_ThreadPoolTimer_Static) },
|
|
544
|
-
{ }
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
static PyType_Spec type_spec_ThreadPoolTimer_Static = {
|
|
548
|
-
"winrt._winrt_windows_system_threading.ThreadPoolTimer_Static",
|
|
549
|
-
static_cast<int>(PyType_Type.tp_basicsize),
|
|
550
|
-
static_cast<int>(PyType_Type.tp_itemsize),
|
|
551
|
-
Py_TPFLAGS_DEFAULT,
|
|
552
|
-
type_slots_ThreadPoolTimer_Static};
|
|
553
|
-
|
|
554
|
-
// ----- Windows.System.Threading Initialization --------------------
|
|
555
|
-
|
|
556
|
-
PyDoc_STRVAR(module_doc, "Windows.System.Threading");
|
|
557
|
-
|
|
558
|
-
static PyModuleDef module_def = {
|
|
559
|
-
PyModuleDef_HEAD_INIT,
|
|
560
|
-
"_winrt_windows_system_threading",
|
|
561
|
-
module_doc,
|
|
562
|
-
0,
|
|
563
|
-
nullptr,
|
|
564
|
-
nullptr,
|
|
565
|
-
nullptr,
|
|
566
|
-
nullptr,
|
|
567
|
-
nullptr};
|
|
568
|
-
} // py::cpp::Windows::System::Threading
|
|
569
|
-
|
|
570
|
-
PyMODINIT_FUNC PyInit__winrt_windows_system_threading(void) noexcept
|
|
571
|
-
{
|
|
572
|
-
using namespace py::cpp::Windows::System::Threading;
|
|
573
|
-
|
|
574
|
-
if (py::import_winrt_runtime() == -1)
|
|
575
|
-
{
|
|
576
|
-
return nullptr;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
py::pyobj_handle module{PyModule_Create(&module_def)};
|
|
580
|
-
|
|
581
|
-
if (!module)
|
|
582
|
-
{
|
|
583
|
-
return nullptr;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
auto inspectable_meta_type = py::get_inspectable_meta_type();
|
|
587
|
-
if (!inspectable_meta_type)
|
|
588
|
-
{
|
|
589
|
-
return nullptr;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
auto object_type = py::get_object_type();
|
|
593
|
-
if (!object_type)
|
|
594
|
-
{
|
|
595
|
-
return nullptr;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
py::pyobj_handle object_bases{PyTuple_Pack(1, object_type)};
|
|
599
|
-
|
|
600
|
-
if (!object_bases)
|
|
601
|
-
{
|
|
602
|
-
return nullptr;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
py::pyobj_handle ThreadPool_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
|
|
606
|
-
if (!ThreadPool_Static_bases)
|
|
607
|
-
{
|
|
608
|
-
return nullptr;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
py::pyobj_handle type_ThreadPool_Static{PyType_FromSpecWithBases(&type_spec_ThreadPool_Static, ThreadPool_Static_bases.get())};
|
|
612
|
-
if (!type_ThreadPool_Static)
|
|
613
|
-
{
|
|
614
|
-
return nullptr;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
py::pytype_handle ThreadPool_type{py::register_python_type(module.get(), &type_spec_ThreadPool, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ThreadPool_Static.get()))};
|
|
618
|
-
if (!ThreadPool_type)
|
|
619
|
-
{
|
|
620
|
-
return nullptr;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
py::pyobj_handle ThreadPoolTimer_Static_bases{PyTuple_Pack(1, reinterpret_cast<PyObject*>(inspectable_meta_type))};
|
|
624
|
-
if (!ThreadPoolTimer_Static_bases)
|
|
625
|
-
{
|
|
626
|
-
return nullptr;
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
py::pyobj_handle type_ThreadPoolTimer_Static{PyType_FromSpecWithBases(&type_spec_ThreadPoolTimer_Static, ThreadPoolTimer_Static_bases.get())};
|
|
630
|
-
if (!type_ThreadPoolTimer_Static)
|
|
631
|
-
{
|
|
632
|
-
return nullptr;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
py::pytype_handle ThreadPoolTimer_type{py::register_python_type(module.get(), &type_spec_ThreadPoolTimer, object_bases.get(), reinterpret_cast<PyTypeObject*>(type_ThreadPoolTimer_Static.get()))};
|
|
636
|
-
if (!ThreadPoolTimer_type)
|
|
637
|
-
{
|
|
638
|
-
return nullptr;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
return module.detach();
|
|
643
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
-
|
|
3
|
-
[build-system]
|
|
4
|
-
requires = ["setuptools>=78", "winrt-sdk"]
|
|
5
|
-
build-backend = "setuptools.build_meta"
|
|
6
|
-
|
|
7
|
-
[project]
|
|
8
|
-
name = "winrt-Windows.System.Threading"
|
|
9
|
-
description = "Python projection of Windows Runtime (WinRT) APIs"
|
|
10
|
-
readme = "README.md"
|
|
11
|
-
license = "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"
|
|
20
|
-
|
|
21
|
-
[project.urls]
|
|
22
|
-
# Homepage = "https://github.com/pywinrt/pywinrt"
|
|
23
|
-
Documentation = "https://pywinrt.readthedocs.io"
|
|
24
|
-
Repository = "https://github.com/pywinrt/pywinrt"
|
|
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.setuptools.package-data]
|
|
33
|
-
"*" = ["*.pyi", "py.typed"]
|
|
34
|
-
|
|
35
|
-
[tool.cibuildwheel]
|
|
36
|
-
# use local winrt-sdk build dependency
|
|
37
|
-
environment = { PYTHONPATH="../../winrt-sdk/src" }
|
|
38
|
-
# don't install winrt-sdk from PyPI
|
|
39
|
-
build-frontend = { name = "build[uv]", args = ["--skip-dependency-check", "--no-isolation"] }
|
|
40
|
-
before-build = "uv pip install setuptools"
|
|
41
|
-
# don't build for PyPy
|
|
42
|
-
skip = "pp*"
|
|
43
|
-
# suppress warnings about ARM64 testing
|
|
44
|
-
test-skip = "*-win_arm64"
|
|
45
|
-
|
|
46
|
-
[tool.cibuildwheel.windows]
|
|
47
|
-
archs = ["x86", "AMD64", "ARM64"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.2.1
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was automatically generated.
|
|
2
|
-
|
|
3
|
-
from setuptools import Extension, setup
|
|
4
|
-
from setuptools.command.build_ext import build_ext
|
|
5
|
-
from winrt_sdk import get_include_dirs
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class build_ext_ex(build_ext):
|
|
9
|
-
def build_extension(self, ext):
|
|
10
|
-
if self.compiler.compiler_type == "msvc":
|
|
11
|
-
ext.extra_compile_args = ["/std:c++20", "/permissive-"]
|
|
12
|
-
elif self.compiler.compiler_type == "mingw32":
|
|
13
|
-
ext.extra_compile_args = ["-std=c++20", "-D_WIN32_WINNT=_WIN32_WINNT_WIN10"]
|
|
14
|
-
# GCC 15 complains about some things that it didn't in the past
|
|
15
|
-
ext.extra_compile_args += ["-Wno-strict-aliasing", "-Wno-template-body"]
|
|
16
|
-
ext.extra_link_args = ["-loleaut32"]
|
|
17
|
-
else:
|
|
18
|
-
raise ValueError(f"Unsupported compiler: {self.compiler.compiler_type}")
|
|
19
|
-
|
|
20
|
-
build_ext.build_extension(self, ext)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
setup(
|
|
24
|
-
cmdclass={"build_ext": build_ext_ex},
|
|
25
|
-
ext_modules=[
|
|
26
|
-
Extension(
|
|
27
|
-
"winrt._winrt_windows_system_threading",
|
|
28
|
-
sources=["py.Windows.System.Threading.cpp"],
|
|
29
|
-
include_dirs=get_include_dirs(),
|
|
30
|
-
libraries=["windowsapp"],
|
|
31
|
-
)
|
|
32
|
-
],
|
|
33
|
-
)
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# WARNING: Please don't edit this file. It was generated by Python/WinRT v3.2.1
|
|
2
|
-
|
|
3
|
-
import enum
|
|
4
|
-
import typing
|
|
5
|
-
import uuid as _uuid
|
|
6
|
-
|
|
7
|
-
import winrt.system
|
|
8
|
-
from winrt._winrt_windows_system_threading import (
|
|
9
|
-
ThreadPool,
|
|
10
|
-
ThreadPoolTimer,
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
if typing.TYPE_CHECKING:
|
|
14
|
-
import winrt.windows.foundation as windows_foundation
|
|
15
|
-
|
|
16
|
-
__all__ = [
|
|
17
|
-
"WorkItemOptions",
|
|
18
|
-
"WorkItemPriority",
|
|
19
|
-
"ThreadPool",
|
|
20
|
-
"ThreadPoolTimer",
|
|
21
|
-
"TimerDestroyedHandler",
|
|
22
|
-
"TimerElapsedHandler",
|
|
23
|
-
"WorkItemHandler",
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
class WorkItemOptions(enum.IntFlag):
|
|
27
|
-
NONE = 0x0
|
|
28
|
-
TIME_SLICED = 0x1
|
|
29
|
-
|
|
30
|
-
class WorkItemPriority(enum.IntEnum):
|
|
31
|
-
LOW = -1
|
|
32
|
-
NORMAL = 0
|
|
33
|
-
HIGH = 1
|
|
34
|
-
|
|
35
|
-
TimerDestroyedHandler = typing.Callable[[ThreadPoolTimer], None]
|
|
36
|
-
TimerElapsedHandler = typing.Callable[[ThreadPoolTimer], None]
|
|
37
|
-
WorkItemHandler = typing.Callable[["windows_foundation.IAsyncAction"], None]
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: winrt-Windows.System.Threading
|
|
3
|
-
Version: 3.2.1
|
|
4
|
-
Summary: Python projection of Windows Runtime (WinRT) APIs
|
|
5
|
-
License-Expression: MIT
|
|
6
|
-
Project-URL: Documentation, https://pywinrt.readthedocs.io
|
|
7
|
-
Project-URL: Repository, https://github.com/pywinrt/pywinrt
|
|
8
|
-
Project-URL: Changelog, https://github.com/pywinrt/pywinrt/blob/main/CHANGELOG.md
|
|
9
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Requires-Python: >=3.9
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
Requires-Dist: winrt-runtime~=3.2.1.0
|
|
16
|
-
Provides-Extra: all
|
|
17
|
-
Requires-Dist: winrt-Windows.Foundation[all]~=3.2.1.0; extra == "all"
|
|
18
|
-
|
|
19
|
-
<!-- warning: Please don't edit this file. It was automatically generated. -->
|
|
20
|
-
|
|
21
|
-
# winrt-Windows.System.Threading
|
|
22
|
-
|
|
23
|
-
Windows Runtime (WinRT) APIs for for the `Windows.System.Threading` namespace.
|
|
24
|
-
|
|
25
|
-
This package provides the `winrt.windows.system.threading` module.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
README.md
|
|
2
|
-
all-requirements.txt
|
|
3
|
-
py.Windows.System.Threading.cpp
|
|
4
|
-
pyproject.toml
|
|
5
|
-
pywinrt-version.txt
|
|
6
|
-
requirements.txt
|
|
7
|
-
setup.py
|
|
8
|
-
winrt/_winrt_windows_system_threading.pyi
|
|
9
|
-
winrt/windows/system/threading/__init__.py
|
|
10
|
-
winrt/windows/system/threading/py.typed
|
|
11
|
-
winrt_Windows.System.Threading.egg-info/PKG-INFO
|
|
12
|
-
winrt_Windows.System.Threading.egg-info/SOURCES.txt
|
|
13
|
-
winrt_Windows.System.Threading.egg-info/dependency_links.txt
|
|
14
|
-
winrt_Windows.System.Threading.egg-info/requires.txt
|
|
15
|
-
winrt_Windows.System.Threading.egg-info/top_level.txt
|
winrt_windows_system_threading-3.2.1/winrt_Windows.System.Threading.egg-info/dependency_links.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
winrt
|