autoxkit 2.4.1__tar.gz → 2.4.3__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.
- {autoxkit-2.4.1 → autoxkit-2.4.3}/PKG-INFO +1 -1
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/hook/hook_listener.py +29 -2
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/mousekey/mouse.py +3 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/window/window_action.py +4 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit.egg-info/PKG-INFO +1 -1
- {autoxkit-2.4.1 → autoxkit-2.4.3}/pyproject.toml +1 -1
- {autoxkit-2.4.1 → autoxkit-2.4.3}/LICENSE.txt +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/README.md +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/__init__.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/__init__.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/adb.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/binary.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/client.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/control.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/control_backup.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/models.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/android/streams.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/constants.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/hook/__init__.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/hook/event.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/hook/hotkey_listener.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/match/__init__.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/match/match.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/mousekey/__init__.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/mousekey/input.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/mousekey/keyboard.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/utils.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/window/__init__.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/window/window.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit/window/window_match.py +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit.egg-info/SOURCES.txt +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit.egg-info/dependency_links.txt +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit.egg-info/requires.txt +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/autoxkit.egg-info/top_level.txt +0 -0
- {autoxkit-2.4.1 → autoxkit-2.4.3}/setup.cfg +0 -0
|
@@ -232,24 +232,51 @@ class HookListener:
|
|
|
232
232
|
elif wParam == HHC["MWheel"]:
|
|
233
233
|
delta = ctypes.c_short(ms.mouseData >> 16).value / 120
|
|
234
234
|
if delta > 0:
|
|
235
|
+
blocked = False
|
|
236
|
+
event = MouseEvent("MouseDown", "MUWheel", x, y, distance=delta)
|
|
237
|
+
for cb in self._on_mousedown:
|
|
238
|
+
try:
|
|
239
|
+
result = cb(event)
|
|
240
|
+
if result is True:
|
|
241
|
+
blocked = True
|
|
242
|
+
except Exception as e:
|
|
243
|
+
print(f"[hook_listener] Exception in mousedown callback: {e}", file=__import__("sys").stderr)
|
|
244
|
+
|
|
235
245
|
event = MouseEvent("MouseUp", "MUWheel", x, y, distance=delta)
|
|
236
246
|
for cb in self._on_mouseup:
|
|
237
247
|
try:
|
|
238
248
|
result = cb(event)
|
|
239
249
|
if result is True:
|
|
240
|
-
|
|
250
|
+
blocked = True
|
|
241
251
|
except Exception as e:
|
|
242
252
|
print(f"[hook_listener] Exception in mouseup callback: {e}", file=__import__("sys").stderr)
|
|
253
|
+
|
|
254
|
+
if blocked:
|
|
255
|
+
return 1 # 截断事件传播
|
|
256
|
+
|
|
243
257
|
elif delta < 0:
|
|
258
|
+
blocked = False
|
|
244
259
|
event = MouseEvent("MouseDown", "MDWheel", x, y, distance=delta)
|
|
245
260
|
for cb in self._on_mousedown:
|
|
246
261
|
try:
|
|
247
262
|
result = cb(event)
|
|
248
263
|
if result is True:
|
|
249
|
-
|
|
264
|
+
blocked = True
|
|
250
265
|
except Exception as e:
|
|
251
266
|
print(f"[hook_listener] Exception in mousedown callback: {e}", file=__import__("sys").stderr)
|
|
252
267
|
|
|
268
|
+
event = MouseEvent("MouseUp", "MDWheel", x, y, distance=delta)
|
|
269
|
+
for cb in self._on_mouseup:
|
|
270
|
+
try:
|
|
271
|
+
result = cb(event)
|
|
272
|
+
if result is True:
|
|
273
|
+
blocked = True
|
|
274
|
+
except Exception as e:
|
|
275
|
+
print(f"[hook_listener] Exception in mouseup callback: {e}", file=__import__("sys").stderr)
|
|
276
|
+
|
|
277
|
+
if blocked:
|
|
278
|
+
return 1 # 截断事件传播
|
|
279
|
+
|
|
253
280
|
except Exception as e:
|
|
254
281
|
print(f"[hook_listener] Exception in _mouse_proc: {e}", file=__import__("sys").stderr)
|
|
255
282
|
|
|
@@ -212,6 +212,8 @@ class WindowAction:
|
|
|
212
212
|
if mode == 'global':
|
|
213
213
|
if x is None or y is None:
|
|
214
214
|
self.mouse.mouse_down(button=button)
|
|
215
|
+
elif x == -1 and y == -1:
|
|
216
|
+
self.mouse.mouse_down(x, y, button)
|
|
215
217
|
else:
|
|
216
218
|
self.mouse.mouse_down(self.client_point.x + x, self.client_point.y + y, button)
|
|
217
219
|
return
|
|
@@ -243,6 +245,8 @@ class WindowAction:
|
|
|
243
245
|
if mode == 'global':
|
|
244
246
|
if x is None or y is None:
|
|
245
247
|
self.mouse.mouse_up(button=button)
|
|
248
|
+
elif x == -1 and y == -1:
|
|
249
|
+
self.mouse.mouse_up(x, y, button)
|
|
246
250
|
else:
|
|
247
251
|
self.mouse.mouse_up(self.client_point.x + x, self.client_point.y + y, button)
|
|
248
252
|
return
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "autoxkit"
|
|
7
|
-
version = "2.4.
|
|
7
|
+
version = "2.4.3"
|
|
8
8
|
description = "Python library for Windows automation and Android device screen casting and control"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|