winprecisiontouchpad 0.1.0__py3-none-any.whl

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.
@@ -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,7 @@
1
+ winprecisiontouchpad/__init__.py,sha256=Cy6mMH8GW1L99J_XoISBt_7UxgKpmvikpq84vA_Uo1M,32
2
+ winprecisiontouchpad/core.py,sha256=Hj7I81Xm1nFewcBQJZjOu6SkGJ2P3S0ppQsl_SRI0dg,532
3
+ winprecisiontouchpad/touchpad.dll,sha256=qBLlBk7y7YnbYMNUOzjCLAbaBk1a6hWR_37YTi0ejHo,95993
4
+ winprecisiontouchpad-0.1.0.dist-info/METADATA,sha256=YK0VqPPLq0FI0rkBo8BmXYpiXLpX0tFkJznDQH3X9XI,417
5
+ winprecisiontouchpad-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ winprecisiontouchpad-0.1.0.dist-info/top_level.txt,sha256=HwZVSJn9dh3-RWZFvADK1y19tllg9zTlqR6xC6aXJFk,21
7
+ winprecisiontouchpad-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ winprecisiontouchpad