outleap 0.7.5__py3-none-any.whl → 0.8.1__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.
- outleap/api_wrappers.py +9 -9
- outleap/scripts/inspector.py +1 -5
- outleap/utils.py +6 -0
- outleap/version.py +2 -2
- {outleap-0.7.5.dist-info → outleap-0.8.1.dist-info}/METADATA +1 -1
- {outleap-0.7.5.dist-info → outleap-0.8.1.dist-info}/RECORD +10 -10
- {outleap-0.7.5.dist-info → outleap-0.8.1.dist-info}/WHEEL +1 -1
- {outleap-0.7.5.dist-info → outleap-0.8.1.dist-info}/entry_points.txt +0 -0
- {outleap-0.7.5.dist-info → outleap-0.8.1.dist-info}/licenses/COPYING +0 -0
- {outleap-0.7.5.dist-info → outleap-0.8.1.dist-info}/top_level.txt +0 -0
outleap/api_wrappers.py
CHANGED
|
@@ -135,10 +135,10 @@ class LLWindowAPI(LEAPAPIWrapper):
|
|
|
135
135
|
keysym: KEYSYM_TYPE = None,
|
|
136
136
|
char: CHAR_TYPE = None,
|
|
137
137
|
path: UI_PATH_TYPE = None,
|
|
138
|
-
) ->
|
|
138
|
+
) -> Optional[asyncio.Future]:
|
|
139
139
|
"""Simulate a key being pressed down"""
|
|
140
140
|
payload = self._convert_key_payload(keysym=keysym, keycode=keycode, char=char, mask=mask, path=path)
|
|
141
|
-
self._client.
|
|
141
|
+
return self._client.command(self._pump_name, "keyDown", payload)
|
|
142
142
|
|
|
143
143
|
def key_up(
|
|
144
144
|
self,
|
|
@@ -149,12 +149,12 @@ class LLWindowAPI(LEAPAPIWrapper):
|
|
|
149
149
|
keysym: KEYSYM_TYPE = None,
|
|
150
150
|
char: CHAR_TYPE = None,
|
|
151
151
|
path: UI_PATH_TYPE = None,
|
|
152
|
-
) ->
|
|
152
|
+
) -> Optional[asyncio.Future]:
|
|
153
153
|
"""Simulate a key being released"""
|
|
154
154
|
payload = self._convert_key_payload(keysym=keysym, keycode=keycode, char=char, mask=mask, path=path)
|
|
155
|
-
self._client.
|
|
155
|
+
return self._client.command(self._pump_name, "keyUp", payload)
|
|
156
156
|
|
|
157
|
-
def key_press(
|
|
157
|
+
async def key_press(
|
|
158
158
|
self,
|
|
159
159
|
/,
|
|
160
160
|
*,
|
|
@@ -165,15 +165,15 @@ class LLWindowAPI(LEAPAPIWrapper):
|
|
|
165
165
|
path: UI_PATH_TYPE = None,
|
|
166
166
|
) -> None:
|
|
167
167
|
"""Simulate a key being pressed down and immediately released"""
|
|
168
|
-
self.key_down(mask=mask, keycode=keycode, keysym=keysym, char=char, path=path)
|
|
169
|
-
self.key_up(mask=mask, keycode=keycode, keysym=keysym, char=char, path=path)
|
|
168
|
+
await self.key_down(mask=mask, keycode=keycode, keysym=keysym, char=char, path=path)
|
|
169
|
+
await self.key_up(mask=mask, keycode=keycode, keysym=keysym, char=char, path=path)
|
|
170
170
|
|
|
171
|
-
def text_input(self, text_input: str, path: UI_PATH_TYPE = None) -> None:
|
|
171
|
+
async def text_input(self, text_input: str, path: UI_PATH_TYPE = None) -> None:
|
|
172
172
|
"""Simulate a user typing a string of text"""
|
|
173
173
|
# TODO: Uhhhhh I can't see how the key* APIs could possibly handle i18n correctly,
|
|
174
174
|
# what with all the U8s. Maybe I'm just dumb?
|
|
175
175
|
for char in text_input:
|
|
176
|
-
self.key_press(char=char, path=path)
|
|
176
|
+
await self.key_press(char=char, path=path)
|
|
177
177
|
|
|
178
178
|
async def get_paths(self, under: Optional[UI_PATH_TYPE] = None) -> List[UIPath]:
|
|
179
179
|
"""Get all UI paths under the root, or under a path if specified"""
|
outleap/scripts/inspector.py
CHANGED
|
@@ -9,21 +9,17 @@ import tempfile
|
|
|
9
9
|
import weakref
|
|
10
10
|
from typing import *
|
|
11
11
|
|
|
12
|
-
import pkg_resources
|
|
13
12
|
from PySide6 import QtCore, QtGui, QtWidgets
|
|
14
13
|
from qasync import QEventLoop, asyncSlot
|
|
15
14
|
|
|
16
15
|
import outleap
|
|
17
16
|
from outleap import LEAPClient, UIElement, UIPath
|
|
18
17
|
from outleap.qt_helpers import GUIInteractionManager, loadUi
|
|
18
|
+
from outleap.utils import get_resource_filename
|
|
19
19
|
|
|
20
20
|
LOG = logging.getLogger(__name__)
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
def get_resource_filename(resource_filename: str):
|
|
24
|
-
return pkg_resources.resource_filename("outleap", resource_filename)
|
|
25
|
-
|
|
26
|
-
|
|
27
23
|
class ElemTreeHeader(enum.IntEnum):
|
|
28
24
|
Name = 0
|
|
29
25
|
|
outleap/utils.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
+
import importlib.resources
|
|
2
3
|
import io
|
|
3
4
|
import os
|
|
4
5
|
import stat
|
|
@@ -168,6 +169,11 @@ async def connect_stdin_stdout() -> Tuple[asyncio.StreamReader, asyncio.StreamWr
|
|
|
168
169
|
return reader, writer
|
|
169
170
|
|
|
170
171
|
|
|
172
|
+
def get_resource_filename(resource_filename: str) -> str:
|
|
173
|
+
return str(importlib.resources.files("outleap").joinpath(resource_filename))
|
|
174
|
+
|
|
175
|
+
|
|
171
176
|
__all__ = [
|
|
172
177
|
"connect_stdin_stdout",
|
|
178
|
+
"get_resource_filename",
|
|
173
179
|
]
|
outleap/version.py
CHANGED
|
@@ -5,7 +5,7 @@ from collections import namedtuple
|
|
|
5
5
|
#: A namedtuple of the version info for the current release.
|
|
6
6
|
_version_info = namedtuple("_version_info", "major minor micro status")
|
|
7
7
|
|
|
8
|
-
parts = "0.
|
|
8
|
+
parts = "0.8.1".split(".", 3)
|
|
9
9
|
version_info = _version_info(
|
|
10
10
|
int(parts[0]),
|
|
11
11
|
int(parts[1]),
|
|
@@ -16,4 +16,4 @@ version_info = _version_info(
|
|
|
16
16
|
# Remove everything but the 'version_info' from this module.
|
|
17
17
|
del namedtuple, _version_info, parts
|
|
18
18
|
|
|
19
|
-
__version__ = "0.
|
|
19
|
+
__version__ = "0.8.1"
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
outleap/__init__.py,sha256=h0VTP95rggZ-iFH1Ke4rh85fiU3BTvfj_jkLW27Ln1k,689
|
|
2
|
-
outleap/api_wrappers.py,sha256=
|
|
2
|
+
outleap/api_wrappers.py,sha256=bPstVWCGFlZPq8DznaCSsyhPIoSAAWnnlxMfxt0Ezro,27218
|
|
3
3
|
outleap/bridge.py,sha256=Q5tku2JP-K0wT9zVA8OyJpFEpumgbUgHaC1YeRQR8vE,1016
|
|
4
4
|
outleap/client.py,sha256=4RFTOSiL2cCwpJ64_sux_DbFh_LjnwjVIlByutGg-ao,14545
|
|
5
5
|
outleap/protocol.py,sha256=HeCnlzszGp6Yxgq__34KYYuii6tpxnfUi5La9SFxw0k,3725
|
|
6
6
|
outleap/qt_helpers.py,sha256=qpdEx7y60T3nAJ4GFDvpcefKEgpgBBnt8dQ-c2IB-Zc,7766
|
|
7
7
|
outleap/ui_elems.py,sha256=ndi3FDp_fu1rVD3rNpFp6hs8eU53U4D_dCtuwFmums0,11577
|
|
8
|
-
outleap/utils.py,sha256=
|
|
9
|
-
outleap/version.py,sha256=
|
|
8
|
+
outleap/utils.py,sha256=lEiWZFMmoyA8hWzWgFm-4mWma7emtCazUXa1Vre-mVY,6099
|
|
9
|
+
outleap/version.py,sha256=MhG0FqLAnH4mu73DL4uUqhEHqZkvbH2AYPc1DK0iErQ,517
|
|
10
10
|
outleap/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
outleap/scripts/agent.py,sha256=YOXtkjqZY7ju9fLhBHRzdhsp9TdhPnDzsXiQo5-Dhfs,1984
|
|
12
|
-
outleap/scripts/inspector.py,sha256=
|
|
12
|
+
outleap/scripts/inspector.py,sha256=ZjLPbJxOFjEwm9m6NDj3_KOIuoqGU10eGDP3ymzStSM,10851
|
|
13
13
|
outleap/scripts/repl.py,sha256=ug133SnSoaOa7qyhfnVbL6xEZIaJV9y-Rvu5cmVCUD8,2249
|
|
14
14
|
outleap/scripts/ui/inspector.ui,sha256=CY-Tczsrpmc2groE6_7s_fIc7de6Oy2TuU2a4ZGzl7o,7269
|
|
15
|
-
outleap-0.
|
|
16
|
-
outleap-0.
|
|
17
|
-
outleap-0.
|
|
18
|
-
outleap-0.
|
|
19
|
-
outleap-0.
|
|
20
|
-
outleap-0.
|
|
15
|
+
outleap-0.8.1.dist-info/licenses/COPYING,sha256=OPIPYHZUdL5ylRYaujIVg05CSvX4-AHW15qBGYz_fyY,1093
|
|
16
|
+
outleap-0.8.1.dist-info/METADATA,sha256=wLMm3l7RNGsxNQvOXtD2ls8mwAyAbDiCSZZ5XHIXvLk,4819
|
|
17
|
+
outleap-0.8.1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
18
|
+
outleap-0.8.1.dist-info/entry_points.txt,sha256=gi7UECBDlCTzn0jUU8xPvyMm_8lOQMZUJuNOe266I48,174
|
|
19
|
+
outleap-0.8.1.dist-info/top_level.txt,sha256=dIQJmMy2IulmIzvBWuz8dup0dm9MV0b4p_hCtBRewfE,8
|
|
20
|
+
outleap-0.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|