@desklink/host 0.1.0
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.
- package/LICENSE +202 -0
- package/NOTICE +44 -0
- package/README.md +266 -0
- package/bin/desklink-host.mjs +113 -0
- package/dist/bridge.d.ts +57 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/bridge.js +208 -0
- package/dist/bridge.js.map +1 -0
- package/dist/engineProcess.d.ts +82 -0
- package/dist/engineProcess.d.ts.map +1 -0
- package/dist/engineProcess.js +243 -0
- package/dist/engineProcess.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +169 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +18 -0
- package/dist/protocol.js.map +1 -0
- package/dist/resolveEngine.d.ts +34 -0
- package/dist/resolveEngine.d.ts.map +1 -0
- package/dist/resolveEngine.js +103 -0
- package/dist/resolveEngine.js.map +1 -0
- package/docs/BOUNDARY.md +145 -0
- package/docs/PROTOCOL.md +363 -0
- package/engine/Cargo.lock +3077 -0
- package/engine/Cargo.toml +37 -0
- package/engine/build.rs +107 -0
- package/engine/native/inputtino_shim.cpp +11 -0
- package/engine/native/vpx_shim.c +184 -0
- package/engine/native/wrapper.h +7 -0
- package/engine/src/capture.rs +510 -0
- package/engine/src/clipboard.rs +132 -0
- package/engine/src/convert.rs +299 -0
- package/engine/src/encoder.rs +204 -0
- package/engine/src/input.rs +355 -0
- package/engine/src/keymap.rs +338 -0
- package/engine/src/main.rs +614 -0
- package/engine/src/peer.rs +775 -0
- package/engine/src/portal.rs +115 -0
- package/engine/src/protocol.rs +331 -0
- package/engine/src/session.rs +2159 -0
- package/engine/src/x11.rs +244 -0
- package/engine/vendor/inputtino/.clang-format +166 -0
- package/engine/vendor/inputtino/.clang-tidy +30 -0
- package/engine/vendor/inputtino/.dockerignore +11 -0
- package/engine/vendor/inputtino/.github/workflows/mirror-repo.yml +14 -0
- package/engine/vendor/inputtino/.github/workflows/python-lint-format-test-typecheck.yml +124 -0
- package/engine/vendor/inputtino/.github/workflows/python-test-install.yaml +49 -0
- package/engine/vendor/inputtino/.github/workflows/rust.yml +40 -0
- package/engine/vendor/inputtino/CMakeLists.txt +187 -0
- package/engine/vendor/inputtino/LICENSE +21 -0
- package/engine/vendor/inputtino/README.md +110 -0
- package/engine/vendor/inputtino/bindings/python/.devcontainer/Dockerfile +23 -0
- package/engine/vendor/inputtino/bindings/python/.devcontainer/devcontainer.json +28 -0
- package/engine/vendor/inputtino/bindings/python/.python-version +1 -0
- package/engine/vendor/inputtino/bindings/python/CMakeLists.txt +23 -0
- package/engine/vendor/inputtino/bindings/python/CPPLINT.cfg +2 -0
- package/engine/vendor/inputtino/bindings/python/Makefile +49 -0
- package/engine/vendor/inputtino/bindings/python/README.md +215 -0
- package/engine/vendor/inputtino/bindings/python/pyproject.toml +178 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/__init__.py +43 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/_core.pyi +533 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/base.py +63 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/joypad.py +248 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/keyboard.py +256 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/mouse.py +106 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/pentablet.py +73 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/py.typed +0 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/touchscreen.py +61 -0
- package/engine/vendor/inputtino/bindings/python/src/inputtino/trackpad.py +74 -0
- package/engine/vendor/inputtino/bindings/python/src/main.cpp +217 -0
- package/engine/vendor/inputtino/bindings/python/tests/__init__.py +0 -0
- package/engine/vendor/inputtino/bindings/python/tests/helpers.py +3 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_base.py +60 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_inputtino.py +5 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_joypad.py +332 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_keyboard.py +164 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_mouse.py +185 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_pentablet.py +198 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_touchscreen.py +144 -0
- package/engine/vendor/inputtino/bindings/python/tests/test_trackpad.py +146 -0
- package/engine/vendor/inputtino/bindings/python/uv.lock +390 -0
- package/engine/vendor/inputtino/bindings/rust/Cargo.toml +6 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/.dockerignore +1 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/Cargo.toml +18 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/examples/keyboard.rs +33 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/examples/mouse.rs +17 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/common.rs +116 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/error.rs +17 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/joypad.rs +74 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/joypad_nintendo.rs +135 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/joypad_ps5.rs +280 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/joypad_xbox.rs +134 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/keyboard.rs +76 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/lib.rs +32 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/src/mouse.rs +178 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/tests/common.rs +38 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/tests/joypads.rs +150 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/tests/keyboard.rs +73 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino/tests/mouse.rs +139 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino-sys/.dockerignore +1 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino-sys/Cargo.toml +12 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino-sys/build.rs +48 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino-sys/src/lib.rs +5 -0
- package/engine/vendor/inputtino/bindings/rust/inputtino-sys/wrapper.h +1 -0
- package/engine/vendor/inputtino/cmake/utils.cmake +9 -0
- package/engine/vendor/inputtino/docker/Dockerfile +70 -0
- package/engine/vendor/inputtino/include/inputtino/input.h +324 -0
- package/engine/vendor/inputtino/include/inputtino/input.hpp +466 -0
- package/engine/vendor/inputtino/include/inputtino/result.hpp +37 -0
- package/engine/vendor/inputtino/share/pkgconfig/libinputtino.pc.in +17 -0
- package/engine/vendor/inputtino/src/c-bindings/helpers.hpp +19 -0
- package/engine/vendor/inputtino/src/c-bindings/joypad_ps5.cpp +115 -0
- package/engine/vendor/inputtino/src/c-bindings/joypad_switch.cpp +63 -0
- package/engine/vendor/inputtino/src/c-bindings/joypad_xone.cpp +62 -0
- package/engine/vendor/inputtino/src/c-bindings/keyboard.cpp +42 -0
- package/engine/vendor/inputtino/src/c-bindings/mouse.cpp +67 -0
- package/engine/vendor/inputtino/src/c-bindings/pen_tablet.cpp +50 -0
- package/engine/vendor/inputtino/src/c-bindings/touchscreen.cpp +43 -0
- package/engine/vendor/inputtino/src/c-bindings/trackpad.cpp +49 -0
- package/engine/vendor/inputtino/src/uhid/README.adoc +63 -0
- package/engine/vendor/inputtino/src/uhid/include/crc32.hpp +38 -0
- package/engine/vendor/inputtino/src/uhid/include/uhid/protected_types.hpp +36 -0
- package/engine/vendor/inputtino/src/uhid/include/uhid/ps5.hpp +550 -0
- package/engine/vendor/inputtino/src/uhid/include/uhid/uhid.hpp +168 -0
- package/engine/vendor/inputtino/src/uhid/joypad_ps5.cpp +580 -0
- package/engine/vendor/inputtino/src/uinput/include/inputtino/keyboard.hpp +84 -0
- package/engine/vendor/inputtino/src/uinput/include/inputtino/protected_ps5_types.hpp +7 -0
- package/engine/vendor/inputtino/src/uinput/include/inputtino/protected_types.hpp +110 -0
- package/engine/vendor/inputtino/src/uinput/joypad_nintendo.cpp +190 -0
- package/engine/vendor/inputtino/src/uinput/joypad_ps.cpp +203 -0
- package/engine/vendor/inputtino/src/uinput/joypad_utils.hpp +246 -0
- package/engine/vendor/inputtino/src/uinput/joypad_xbox.cpp +190 -0
- package/engine/vendor/inputtino/src/uinput/keyboard.cpp +120 -0
- package/engine/vendor/inputtino/src/uinput/mouse.cpp +199 -0
- package/engine/vendor/inputtino/src/uinput/pentablet.cpp +162 -0
- package/engine/vendor/inputtino/src/uinput/touchscreen.cpp +140 -0
- package/engine/vendor/inputtino/src/uinput/trackpad.cpp +192 -0
- package/examples/reference-client.html +428 -0
- package/package.json +38 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "inputtino-python"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Python bindings for the inputtino library, providing virtual input device control for Linux."
|
|
5
|
+
license-files = ["LICENSE"]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Geson-anko", email = "59220704+Geson-anko@users.noreply.github.com" }
|
|
9
|
+
]
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"typing-extensions>=4.12.2",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
keywords = [
|
|
16
|
+
"control",
|
|
17
|
+
"gui",
|
|
18
|
+
"automation",
|
|
19
|
+
"keyboard",
|
|
20
|
+
"mouse",
|
|
21
|
+
"joypad",
|
|
22
|
+
"pentablet",
|
|
23
|
+
"touchscreen",
|
|
24
|
+
"linux",
|
|
25
|
+
"uinput",
|
|
26
|
+
"trackpad",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
classifiers = [
|
|
30
|
+
"Development Status :: 3 - Alpha",
|
|
31
|
+
"License :: OSI Approved :: MIT License",
|
|
32
|
+
"Operating System :: POSIX :: Linux",
|
|
33
|
+
"Environment :: X11 Applications",
|
|
34
|
+
"Natural Language :: English",
|
|
35
|
+
"Natural Language :: Japanese",
|
|
36
|
+
"Intended Audience :: Developers",
|
|
37
|
+
"Typing :: Typed",
|
|
38
|
+
"Programming Language :: C++",
|
|
39
|
+
"Programming Language :: Python",
|
|
40
|
+
"Programming Language :: Python :: 3",
|
|
41
|
+
"Programming Language :: Python :: 3.10",
|
|
42
|
+
"Programming Language :: Python :: 3.11",
|
|
43
|
+
"Programming Language :: Python :: 3.12",
|
|
44
|
+
"Programming Language :: Python :: 3.13",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Repository = "https://github.com/games-on-whales/inputtino"
|
|
49
|
+
Issues = "https://github.com/games-on-whales/inputtino/issues"
|
|
50
|
+
|
|
51
|
+
[tool.uv]
|
|
52
|
+
python-preference = "only-managed"
|
|
53
|
+
|
|
54
|
+
[tool.scikit-build]
|
|
55
|
+
wheel.packages = ["src/inputtino"]
|
|
56
|
+
minimum-version = "build-system.requires"
|
|
57
|
+
build-dir = "build/{wheel_tag}"
|
|
58
|
+
|
|
59
|
+
[build-system]
|
|
60
|
+
requires = ["scikit-build-core>=0.10", "pybind11"]
|
|
61
|
+
build-backend = "scikit_build_core.build"
|
|
62
|
+
|
|
63
|
+
[dependency-groups]
|
|
64
|
+
dev = [
|
|
65
|
+
"docformatter>=1.7.5",
|
|
66
|
+
"pybind11>=2.13.6",
|
|
67
|
+
"pybind11-stubgen>=2.5.1",
|
|
68
|
+
"pyright>=1.1.393",
|
|
69
|
+
"pytest>=8.3.4",
|
|
70
|
+
"pytest-cov>=6.0.0",
|
|
71
|
+
"pyupgrade>=3.19.1",
|
|
72
|
+
"ruff>=0.9.5",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
[tool.pyright]
|
|
76
|
+
pythonVersion = "3.10"
|
|
77
|
+
exclude = [
|
|
78
|
+
"**/node_modules",
|
|
79
|
+
"**/__pycache__",
|
|
80
|
+
]
|
|
81
|
+
strict = ["./src/"]
|
|
82
|
+
reportMissingModuleSource = "none"
|
|
83
|
+
|
|
84
|
+
[tool.pytest.ini_options]
|
|
85
|
+
addopts = [
|
|
86
|
+
"--color=yes",
|
|
87
|
+
"--durations=0",
|
|
88
|
+
"--strict-markers",
|
|
89
|
+
"--doctest-modules",
|
|
90
|
+
]
|
|
91
|
+
filterwarnings = [
|
|
92
|
+
"ignore::DeprecationWarning",
|
|
93
|
+
"ignore::UserWarning",
|
|
94
|
+
]
|
|
95
|
+
log_cli = "True"
|
|
96
|
+
|
|
97
|
+
minversion = "6.0"
|
|
98
|
+
testpaths = "tests/"
|
|
99
|
+
|
|
100
|
+
markers = [
|
|
101
|
+
"practical: tests that interact with actual endpoints",
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
[tool.ruff]
|
|
106
|
+
|
|
107
|
+
# Same as Black.
|
|
108
|
+
line-length = 88
|
|
109
|
+
indent-width = 4
|
|
110
|
+
|
|
111
|
+
# Assume Python 3.10
|
|
112
|
+
target-version = "py310"
|
|
113
|
+
|
|
114
|
+
include = ["*.py"]
|
|
115
|
+
|
|
116
|
+
# Exclude a variety of commonly ignored directories.
|
|
117
|
+
exclude = [
|
|
118
|
+
".git",
|
|
119
|
+
".ipynb_checkpoints",
|
|
120
|
+
".pytest_cache",
|
|
121
|
+
".ruff_cache",
|
|
122
|
+
".venv",
|
|
123
|
+
".vscode",
|
|
124
|
+
"build",
|
|
125
|
+
"dist",
|
|
126
|
+
"node_modules",
|
|
127
|
+
".venv",
|
|
128
|
+
]
|
|
129
|
+
|
|
130
|
+
# Linter ignore codes
|
|
131
|
+
[tool.ruff.lint]
|
|
132
|
+
|
|
133
|
+
select = [
|
|
134
|
+
"E",
|
|
135
|
+
"F",
|
|
136
|
+
"W",
|
|
137
|
+
"I",
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
ignore = [
|
|
141
|
+
"E203", # Whitespace before ':' (E203)
|
|
142
|
+
"E402", # Module level import not at top of file.
|
|
143
|
+
"E501", # Line too long (82 > 79 characters) (E501)
|
|
144
|
+
"F811", # Redefinition of unused name from line n (F811)
|
|
145
|
+
"E741", # Do not define classes named 'I', 'O', or 'l' (E742)
|
|
146
|
+
"E266", # too many leading '#' for block comment (E266)
|
|
147
|
+
"F401", # Module imported but unused,
|
|
148
|
+
]
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
[tool.ruff.lint.isort]
|
|
152
|
+
combine-as-imports = true
|
|
153
|
+
|
|
154
|
+
[tool.ruff.format]
|
|
155
|
+
# Like Black, use double quotes for strings.
|
|
156
|
+
quote-style = "double"
|
|
157
|
+
|
|
158
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
159
|
+
indent-style = "space"
|
|
160
|
+
|
|
161
|
+
# Like Black, respect magic trailing commas.
|
|
162
|
+
skip-magic-trailing-comma = false
|
|
163
|
+
|
|
164
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
165
|
+
line-ending = "auto"
|
|
166
|
+
|
|
167
|
+
[tool.coverage.run]
|
|
168
|
+
omit = ["tests/*"]
|
|
169
|
+
|
|
170
|
+
[tool.coverage.report]
|
|
171
|
+
exclude_lines = [
|
|
172
|
+
"pragma: no cover",
|
|
173
|
+
"def __repr__",
|
|
174
|
+
"raise NotImplementedError",
|
|
175
|
+
"if __name__ == __main__:",
|
|
176
|
+
"pass",
|
|
177
|
+
"raise ImportError",
|
|
178
|
+
]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from importlib import metadata
|
|
2
|
+
|
|
3
|
+
from .base import DeviceDefinition, VirtualDevice
|
|
4
|
+
from .joypad import (
|
|
5
|
+
ControllerButton,
|
|
6
|
+
Joypad,
|
|
7
|
+
PS5BatteryState,
|
|
8
|
+
PS5Joypad,
|
|
9
|
+
PS5MotionType,
|
|
10
|
+
StickPosition,
|
|
11
|
+
SwitchJoypad,
|
|
12
|
+
XBoxOneJoypad,
|
|
13
|
+
)
|
|
14
|
+
from .keyboard import Keyboard, KeyCode
|
|
15
|
+
from .mouse import Mouse, MouseButton
|
|
16
|
+
from .pentablet import PenButtonType, PenTablet, PenToolType
|
|
17
|
+
from .touchscreen import TouchScreen
|
|
18
|
+
from .trackpad import Trackpad
|
|
19
|
+
|
|
20
|
+
__version__ = metadata.version("inputtino-python")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
__all__ = [
|
|
24
|
+
"DeviceDefinition",
|
|
25
|
+
"Keyboard",
|
|
26
|
+
"KeyCode",
|
|
27
|
+
"Mouse",
|
|
28
|
+
"MouseButton",
|
|
29
|
+
"Joypad",
|
|
30
|
+
"PS5BatteryState",
|
|
31
|
+
"PS5Joypad",
|
|
32
|
+
"PS5MotionType",
|
|
33
|
+
"StickPosition",
|
|
34
|
+
"SwitchJoypad",
|
|
35
|
+
"XBoxOneJoypad",
|
|
36
|
+
"ControllerButton",
|
|
37
|
+
"TouchScreen",
|
|
38
|
+
"Trackpad",
|
|
39
|
+
"PenButtonType",
|
|
40
|
+
"PenTablet",
|
|
41
|
+
"PenToolType",
|
|
42
|
+
"VirtualDevice",
|
|
43
|
+
]
|