pyloid 0.16.5__tar.gz → 0.16.8__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyloid-0.16.5 → pyloid-0.16.8}/PKG-INFO +1 -1
- {pyloid-0.16.5 → pyloid-0.16.8}/pyproject.toml +1 -1
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/browser_window.py +50 -12
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/pyloid.py +3 -2
- {pyloid-0.16.5 → pyloid-0.16.8}/LICENSE +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/README.md +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/__init__.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/api.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/autostart.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/custom/titlebar.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/filewatcher.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/js_api/event_api.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/js_api/window_api.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/monitor.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/timer.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/tray.py +0 -0
- {pyloid-0.16.5 → pyloid-0.16.8}/src/pyloid/utils.py +0 -0
@@ -277,9 +277,48 @@ class BrowserWindow:
|
|
277
277
|
self.set_size(self.width, self.height)
|
278
278
|
self.set_position(self.x, self.y)
|
279
279
|
|
280
|
-
# allow local file access to remote urls
|
280
|
+
# allow local file access to remote urls and screen capture
|
281
281
|
self.web_view.settings().setAttribute(
|
282
|
-
QWebEngineSettings.LocalContentCanAccessRemoteUrls, True
|
282
|
+
QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True
|
283
|
+
)
|
284
|
+
self.web_view.settings().setAttribute(
|
285
|
+
QWebEngineSettings.WebAttribute.ScreenCaptureEnabled, True
|
286
|
+
)
|
287
|
+
self.web_view.settings().setAttribute(
|
288
|
+
QWebEngineSettings.WebAttribute.AutoLoadImages, True
|
289
|
+
)
|
290
|
+
self.web_view.settings().setAttribute(
|
291
|
+
QWebEngineSettings.WebAttribute.JavascriptEnabled, True
|
292
|
+
)
|
293
|
+
self.web_view.settings().setAttribute(
|
294
|
+
QWebEngineSettings.WebAttribute.LocalStorageEnabled, True
|
295
|
+
)
|
296
|
+
self.web_view.settings().setAttribute(
|
297
|
+
QWebEngineSettings.WebAttribute.ErrorPageEnabled, True
|
298
|
+
)
|
299
|
+
self.web_view.settings().setAttribute(
|
300
|
+
QWebEngineSettings.WebAttribute.AutoLoadIconsForPage, True
|
301
|
+
)
|
302
|
+
self.web_view.settings().setAttribute(
|
303
|
+
QWebEngineSettings.WebAttribute.ShowScrollBars, True
|
304
|
+
)
|
305
|
+
self.web_view.settings().setAttribute(
|
306
|
+
QWebEngineSettings.WebAttribute.DnsPrefetchEnabled, True
|
307
|
+
)
|
308
|
+
self.web_view.settings().setAttribute(
|
309
|
+
QWebEngineSettings.WebAttribute.PdfViewerEnabled, True
|
310
|
+
)
|
311
|
+
self.web_view.settings().setAttribute(
|
312
|
+
QWebEngineSettings.WebAttribute.FullScreenSupportEnabled, True
|
313
|
+
)
|
314
|
+
self.web_view.settings().setAttribute(
|
315
|
+
QWebEngineSettings.WebAttribute.JavascriptCanAccessClipboard, True
|
316
|
+
)
|
317
|
+
self.web_view.settings().setImageAnimationPolicy(
|
318
|
+
QWebEngineSettings.ImageAnimationPolicy.Allow
|
319
|
+
)
|
320
|
+
self.web_view.settings().setUnknownUrlSchemePolicy(
|
321
|
+
QWebEngineSettings.UnknownUrlSchemePolicy.AllowAllUnknownUrlSchemes
|
283
322
|
)
|
284
323
|
|
285
324
|
# Set icon
|
@@ -331,7 +370,6 @@ class BrowserWindow:
|
|
331
370
|
source = bytes(qwebchannel_js.readAll()).decode("utf-8")
|
332
371
|
self.web_view.page().runJavaScript(source)
|
333
372
|
qwebchannel_js.close()
|
334
|
-
|
335
373
|
|
336
374
|
js_code = """
|
337
375
|
if (typeof QWebChannel !== 'undefined') {
|
@@ -1693,7 +1731,7 @@ class BrowserWindow:
|
|
1693
1731
|
Examples
|
1694
1732
|
--------
|
1695
1733
|
```python
|
1696
|
-
window.set_web_engine_view_attribute(QWebEngineSettings.WebAttribute.
|
1734
|
+
window.set_web_engine_view_attribute(QWebEngineSettings.WebAttribute.ScreenCaptureEnabled, False)
|
1697
1735
|
```
|
1698
1736
|
"""
|
1699
1737
|
settings = self.web_view.settings()
|
@@ -1716,7 +1754,7 @@ class BrowserWindow:
|
|
1716
1754
|
Examples
|
1717
1755
|
--------
|
1718
1756
|
```python
|
1719
|
-
window.is_web_engine_view_attribute(QWebEngineSettings.WebAttribute.
|
1757
|
+
window.is_web_engine_view_attribute(QWebEngineSettings.WebAttribute.ScreenCaptureEnabled)
|
1720
1758
|
```
|
1721
1759
|
"""
|
1722
1760
|
settings = self.web_view.settings()
|
@@ -1724,14 +1762,14 @@ class BrowserWindow:
|
|
1724
1762
|
|
1725
1763
|
def set_permission_handler(self, feature: QWebEnginePage.Feature, handler):
|
1726
1764
|
"""
|
1727
|
-
|
1765
|
+
Sets a handler for a specific permission.
|
1728
1766
|
|
1729
1767
|
Parameters
|
1730
1768
|
----------
|
1731
1769
|
feature : QWebEnginePage.Feature
|
1732
|
-
|
1770
|
+
The type of permission to set
|
1733
1771
|
handler : callable
|
1734
|
-
|
1772
|
+
The handler function to process the permission request
|
1735
1773
|
|
1736
1774
|
Examples
|
1737
1775
|
--------
|
@@ -1753,12 +1791,12 @@ class BrowserWindow:
|
|
1753
1791
|
|
1754
1792
|
def grant_permission(self, feature: QWebEnginePage.Feature):
|
1755
1793
|
"""
|
1756
|
-
|
1794
|
+
Automatically grants a specific permission when a request is made.
|
1757
1795
|
|
1758
1796
|
Parameters
|
1759
1797
|
----------
|
1760
1798
|
feature : QWebEnginePage.Feature
|
1761
|
-
|
1799
|
+
The type of permission to automatically grant
|
1762
1800
|
|
1763
1801
|
Examples
|
1764
1802
|
--------
|
@@ -1776,12 +1814,12 @@ class BrowserWindow:
|
|
1776
1814
|
|
1777
1815
|
def deny_permission(self, feature: QWebEnginePage.Feature):
|
1778
1816
|
"""
|
1779
|
-
|
1817
|
+
Automatically denies a specific permission when a request is made.
|
1780
1818
|
|
1781
1819
|
Parameters
|
1782
1820
|
----------
|
1783
1821
|
feature : QWebEnginePage.Feature
|
1784
|
-
|
1822
|
+
The type of permission to automatically deny
|
1785
1823
|
|
1786
1824
|
Examples
|
1787
1825
|
--------
|
@@ -48,8 +48,9 @@ def custom_message_handler(mode, context, message):
|
|
48
48
|
print(
|
49
49
|
"\033[93mPyloid Warning: Vulkan GPU API issue detected. Switching to software backend.\033[0m"
|
50
50
|
)
|
51
|
-
|
52
|
-
|
51
|
+
if "linux" in sys.platform:
|
52
|
+
os.environ["QT_QUICK_BACKEND"] = "software"
|
53
|
+
custom_message_handler.vulkan_warning_shown = True
|
53
54
|
|
54
55
|
if "Autofill.enable failed" in message:
|
55
56
|
print(
|
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
|