pyloid 0.24.3__py3-none-any.whl → 0.24.4.dev0__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.
- pyloid/browser_window.py +26 -24
- pyloid/js_api/base.py +8 -10
- {pyloid-0.24.3.dist-info → pyloid-0.24.4.dev0.dist-info}/LICENSE +1 -1
- {pyloid-0.24.3.dist-info → pyloid-0.24.4.dev0.dist-info}/METADATA +3 -4
- {pyloid-0.24.3.dist-info → pyloid-0.24.4.dev0.dist-info}/RECORD +6 -6
- {pyloid-0.24.3.dist-info → pyloid-0.24.4.dev0.dist-info}/WHEEL +0 -0
pyloid/browser_window.py
CHANGED
@@ -40,7 +40,7 @@ from PySide6.QtWidgets import QSplashScreen, QLabel
|
|
40
40
|
from typing import TYPE_CHECKING, Any
|
41
41
|
from PySide6.QtWebEngineCore import (
|
42
42
|
QWebEngineSettings,
|
43
|
-
QWebEngineDesktopMediaRequest,
|
43
|
+
# QWebEngineDesktopMediaRequest, # 6.8.3 부터
|
44
44
|
)
|
45
45
|
import threading
|
46
46
|
|
@@ -55,7 +55,7 @@ class CustomWebPage(QWebEnginePage):
|
|
55
55
|
def __init__(self, profile=None):
|
56
56
|
super().__init__(profile)
|
57
57
|
self.featurePermissionRequested.connect(self._handlePermissionRequest)
|
58
|
-
self.desktopMediaRequested.connect(self._handleDesktopMediaRequest)
|
58
|
+
# self.desktopMediaRequested.connect(self._handleDesktopMediaRequest)
|
59
59
|
self._permission_handlers = {}
|
60
60
|
self._desktop_media_handler = None
|
61
61
|
self._url_handlers = {} # URL 핸들러 저장을 위한 딕셔너리 추가
|
@@ -78,27 +78,27 @@ class CustomWebPage(QWebEnginePage):
|
|
78
78
|
"""Register a handler for a specific permission"""
|
79
79
|
self._permission_handlers[feature] = handler
|
80
80
|
|
81
|
-
def _handleDesktopMediaRequest(self, request: QWebEngineDesktopMediaRequest):
|
82
|
-
|
83
|
-
|
81
|
+
# def _handleDesktopMediaRequest(self, request: QWebEngineDesktopMediaRequest):
|
82
|
+
# return
|
83
|
+
# print("Desktop media request received:", request)
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
85
|
+
# # 사용 가능한 화면 목록 확인
|
86
|
+
# screens_model = request.screensModel()
|
87
|
+
# print("\n=== Available Screens ===")
|
88
|
+
# for i in range(screens_model.rowCount()):
|
89
|
+
# screen_index = screens_model.index(i)
|
90
|
+
# screen_name = screens_model.data(screen_index)
|
91
|
+
# print(f"Screen {i}: {screen_name}")
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
93
|
+
# # 사용 가능한 창 목록 확인
|
94
|
+
# windows_model = request.windowsModel()
|
95
|
+
# print("\n=== Available Windows ===")
|
96
|
+
# for i in range(windows_model.rowCount()):
|
97
|
+
# window_index = windows_model.index(i)
|
98
|
+
# window_name = windows_model.data(window_index)
|
99
|
+
# print(f"Window {i}: {window_name}")
|
100
100
|
|
101
|
-
|
101
|
+
# request.selectWindow(windows_model.index(3))
|
102
102
|
|
103
103
|
# # interceptor ( navigation request )
|
104
104
|
# def acceptNavigationRequest(self, url, navigation_type, is_main_frame):
|
@@ -721,7 +721,7 @@ class _BrowserWindow:
|
|
721
721
|
"""
|
722
722
|
self.width = width
|
723
723
|
self.height = height
|
724
|
-
self._window.
|
724
|
+
self._window.resize(self.width, self.height)
|
725
725
|
|
726
726
|
def set_position(self, x: int, y: int):
|
727
727
|
"""
|
@@ -742,7 +742,7 @@ class _BrowserWindow:
|
|
742
742
|
"""
|
743
743
|
self.x = x
|
744
744
|
self.y = y
|
745
|
-
self._window.
|
745
|
+
self._window.move(self.x, self.y)
|
746
746
|
|
747
747
|
def set_position_by_anchor(self, anchor: str):
|
748
748
|
"""
|
@@ -1344,7 +1344,8 @@ class _BrowserWindow:
|
|
1344
1344
|
app.run()
|
1345
1345
|
```
|
1346
1346
|
"""
|
1347
|
-
|
1347
|
+
size = self._window.size()
|
1348
|
+
return {"width": size.width(), "height": size.height()}
|
1348
1349
|
|
1349
1350
|
def get_position(self) -> Dict[str, int]:
|
1350
1351
|
"""
|
@@ -1367,7 +1368,8 @@ class _BrowserWindow:
|
|
1367
1368
|
app.run()
|
1368
1369
|
```
|
1369
1370
|
"""
|
1370
|
-
|
1371
|
+
pos = self._window.pos()
|
1372
|
+
return {"x": pos.x(), "y": pos.y()}
|
1371
1373
|
|
1372
1374
|
def get_title(self) -> str:
|
1373
1375
|
"""
|
pyloid/js_api/base.py
CHANGED
@@ -10,7 +10,9 @@ if TYPE_CHECKING:
|
|
10
10
|
|
11
11
|
|
12
12
|
class BaseAPI(PyloidAPI):
|
13
|
-
def __init__(
|
13
|
+
def __init__(
|
14
|
+
self, window_id: str, data: dict, app: "_Pyloid", rpc_url: Optional[str] = None
|
15
|
+
):
|
14
16
|
super().__init__()
|
15
17
|
self.window_id: str = window_id
|
16
18
|
self.data: dict = data
|
@@ -174,17 +176,15 @@ class BaseAPI(PyloidAPI):
|
|
174
176
|
def getSize(self):
|
175
177
|
"""Returns the size of the window."""
|
176
178
|
window = self.app.get_window_by_id(self.window_id)
|
177
|
-
|
178
|
-
|
179
|
-
if window
|
180
|
-
else {"width": 0, "height": 0}
|
181
|
-
)
|
179
|
+
size = window.get_size()
|
180
|
+
return size if window else {"width": 0, "height": 0}
|
182
181
|
|
183
182
|
@Bridge(result=dict)
|
184
183
|
def getPosition(self):
|
185
184
|
"""Returns the position of the window."""
|
186
185
|
window = self.app.get_window_by_id(self.window_id)
|
187
|
-
|
186
|
+
pos = window.get_position()
|
187
|
+
return pos if window else {"x": 0, "y": 0}
|
188
188
|
|
189
189
|
###############################################################
|
190
190
|
# Clipboard
|
@@ -252,10 +252,8 @@ class BaseAPI(PyloidAPI):
|
|
252
252
|
def getProductionPath(self, path: str):
|
253
253
|
"""Returns the production path of the application."""
|
254
254
|
return get_production_path(path)
|
255
|
-
|
255
|
+
|
256
256
|
@Bridge(result=str)
|
257
257
|
def getRpcUrl(self):
|
258
258
|
"""Returns the RPC URL of the application."""
|
259
259
|
return self.rpc_url
|
260
|
-
|
261
|
-
|
@@ -198,4 +198,4 @@ Apache License
|
|
198
198
|
distributed under the License is distributed on an "AS IS" BASIS,
|
199
199
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
200
|
See the License for the specific language governing permissions and
|
201
|
-
limitations under the License.
|
201
|
+
limitations under the License.
|
@@ -1,20 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pyloid
|
3
|
-
Version: 0.24.
|
3
|
+
Version: 0.24.4.dev0
|
4
4
|
Summary:
|
5
5
|
Author: aesthetics-of-record
|
6
6
|
Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
|
7
|
-
Requires-Python: >=3.9,<3.
|
7
|
+
Requires-Python: >=3.9,<3.13
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
9
9
|
Classifier: Programming Language :: Python :: 3.9
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
13
|
-
Classifier: Programming Language :: Python :: 3.13
|
14
13
|
Requires-Dist: aiohttp-cors (>=0.8.1,<0.9.0)
|
15
14
|
Requires-Dist: pickledb (>=1.3.2,<2.0.0)
|
16
15
|
Requires-Dist: platformdirs (>=4.3.7,<5.0.0)
|
17
|
-
Requires-Dist: pyside6 (==6.8.
|
16
|
+
Requires-Dist: pyside6 (==6.8.0)
|
18
17
|
Description-Content-Type: text/markdown
|
19
18
|
|
20
19
|
<h1 style="text-align: center; font-size: 200px; font-weight: 500;">
|
@@ -1,10 +1,10 @@
|
|
1
1
|
pyloid/__init__.py,sha256=YKwMCSOds1QVi9N7EGfY0Z7BEjJn8j6HGqRblZlZClA,235
|
2
2
|
pyloid/api.py,sha256=A61Kmddh8BlpT3LfA6NbPQNzFmD95vQ4WKX53oKsGYU,2419
|
3
3
|
pyloid/autostart.py,sha256=K7DQYl4LHItvPp0bt1V9WwaaZmVSTeGvadkcwG-KKrI,3899
|
4
|
-
pyloid/browser_window.py,sha256
|
4
|
+
pyloid/browser_window.py,sha256=-tXG3zUFBliYo-vOb3pSiZ5uABnjC5wtOPzT7PoXnY4,101317
|
5
5
|
pyloid/custom/titlebar.py,sha256=itzK9pJbZMQ7BKca9kdbuHMffurrw15UijR6OU03Xsk,3894
|
6
6
|
pyloid/filewatcher.py,sha256=3M5zWVUf1OhlkWJcDFC8ZA9agO4Q-U8WdgGpy6kaVz0,4601
|
7
|
-
pyloid/js_api/base.py,sha256=
|
7
|
+
pyloid/js_api/base.py,sha256=Z3ID-4AJ0eHusmljRltlSaK4m2RKvRNfmqX76NLF77o,8585
|
8
8
|
pyloid/js_api/event_api.py,sha256=w0z1DcmwcmseqfcoZWgsQmFC2iBCgTMVJubTaHeXI1c,957
|
9
9
|
pyloid/js_api/window_api.py,sha256=-isphU3m2wGB5U0yZrSuK_4XiBz2mG45HsjYTUq7Fxs,7348
|
10
10
|
pyloid/monitor.py,sha256=1mXvHm5deohnNlTLcRx4sT4x-stnOIb0dUQnnxN50Uo,28295
|
@@ -17,7 +17,7 @@ pyloid/timer.py,sha256=RqMsChFUd93cxMVgkHWiIKrci0QDTBgJSTULnAtYT8M,8712
|
|
17
17
|
pyloid/tray.py,sha256=D12opVEc2wc2T4tK9epaN1oOdeziScsIVNM2uCN7C-A,1710
|
18
18
|
pyloid/url_interceptor.py,sha256=AFjPANDELc9-E-1TnVvkNVc-JZBJYf0677dWQ8LDaqw,726
|
19
19
|
pyloid/utils.py,sha256=J6owgVE1YDOEfcOPmoP9m9Q6nbYDyNEo9uqPsJs5p5g,6644
|
20
|
-
pyloid-0.24.
|
21
|
-
pyloid-0.24.
|
22
|
-
pyloid-0.24.
|
23
|
-
pyloid-0.24.
|
20
|
+
pyloid-0.24.4.dev0.dist-info/LICENSE,sha256=F96EzotgWhhpnQTW2TcdoqrMDir1jyEo6H915tGQ-QE,11524
|
21
|
+
pyloid-0.24.4.dev0.dist-info/METADATA,sha256=Kh9etxF0hhZKZoR3rm3_ekwVftvLmr78E0gR2h4sfWM,2158
|
22
|
+
pyloid-0.24.4.dev0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
23
|
+
pyloid-0.24.4.dev0.dist-info/RECORD,,
|
File without changes
|