winprecisiontouchpad 0.1.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.
- winprecisiontouchpad-0.1.0/MANIFEST.in +1 -0
- winprecisiontouchpad-0.1.0/PKG-INFO +21 -0
- winprecisiontouchpad-0.1.0/README.md +12 -0
- winprecisiontouchpad-0.1.0/pyproject.toml +19 -0
- winprecisiontouchpad-0.1.0/setup.cfg +4 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad/__init__.py +1 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad/core.py +28 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad/touchpad.dll +0 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad.egg-info/PKG-INFO +21 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad.egg-info/SOURCES.txt +10 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad.egg-info/dependency_links.txt +1 -0
- winprecisiontouchpad-0.1.0/winprecisiontouchpad.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include winprecisiontouchpad/touchpad.dll
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: winprecisiontouchpad
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Low-level Precision Touchpad input for Windows
|
|
5
|
+
Author: macsipac
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
Touchpad Input Library
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
import touchpad
|
|
14
|
+
|
|
15
|
+
print(touchpad.XLimit, touchpad.YLimit)
|
|
16
|
+
|
|
17
|
+
def on_move(x, y):
|
|
18
|
+
print(x, y)
|
|
19
|
+
|
|
20
|
+
touchpad.connect(on_move)
|
|
21
|
+
touchpad.start()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "winprecisiontouchpad"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Low-level Precision Touchpad input for Windows"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
|
|
13
|
+
authors = [
|
|
14
|
+
{name = "macsipac"}
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[tool.setuptools]
|
|
18
|
+
packages = ["winprecisiontouchpad"]
|
|
19
|
+
include-package-data = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .core import connect, start
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ctypes
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
dll_path = os.path.join(os.path.dirname(__file__), "touchpad.dll")
|
|
5
|
+
dll = ctypes.WinDLL(dll_path)
|
|
6
|
+
|
|
7
|
+
CALLBACK = ctypes.WINFUNCTYPE(None, ctypes.c_int, ctypes.c_int)
|
|
8
|
+
|
|
9
|
+
_listeners = []
|
|
10
|
+
|
|
11
|
+
def _internal_callback(x, y):
|
|
12
|
+
for fn in _listeners:
|
|
13
|
+
fn(x, y)
|
|
14
|
+
|
|
15
|
+
_cb = CALLBACK(_internal_callback)
|
|
16
|
+
|
|
17
|
+
dll.start_touchpad.argtypes = [CALLBACK]
|
|
18
|
+
dll.start_touchpad.restype = None
|
|
19
|
+
|
|
20
|
+
XLimit = 4024
|
|
21
|
+
YLimit = 2344
|
|
22
|
+
|
|
23
|
+
def connect(fn):
|
|
24
|
+
_listeners.append(fn)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def start():
|
|
28
|
+
dll.start_touchpad(_cb)
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: winprecisiontouchpad
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Low-level Precision Touchpad input for Windows
|
|
5
|
+
Author: macsipac
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
Touchpad Input Library
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
import touchpad
|
|
14
|
+
|
|
15
|
+
print(touchpad.XLimit, touchpad.YLimit)
|
|
16
|
+
|
|
17
|
+
def on_move(x, y):
|
|
18
|
+
print(x, y)
|
|
19
|
+
|
|
20
|
+
touchpad.connect(on_move)
|
|
21
|
+
touchpad.start()
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
winprecisiontouchpad/__init__.py
|
|
5
|
+
winprecisiontouchpad/core.py
|
|
6
|
+
winprecisiontouchpad/touchpad.dll
|
|
7
|
+
winprecisiontouchpad.egg-info/PKG-INFO
|
|
8
|
+
winprecisiontouchpad.egg-info/SOURCES.txt
|
|
9
|
+
winprecisiontouchpad.egg-info/dependency_links.txt
|
|
10
|
+
winprecisiontouchpad.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
winprecisiontouchpad
|