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.
@@ -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,12 @@
1
+ Touchpad Input Library
2
+
3
+ ```python
4
+ import touchpad
5
+
6
+ print(touchpad.XLimit, touchpad.YLimit)
7
+
8
+ def on_move(x, y):
9
+ print(x, y)
10
+
11
+ touchpad.connect(on_move)
12
+ 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,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -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)
@@ -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
+ winprecisiontouchpad