pyloid 0.16.5__py3-none-any.whl → 0.16.8__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
pyloid/browser_window.py CHANGED
@@ -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.JavascriptCanAccessClipboard, False)
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.JavascriptCanAccessClipboard)
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
  --------
pyloid/pyloid.py CHANGED
@@ -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
- os.environ["QT_QUICK_BACKEND"] = "software"
52
- custom_message_handler.vulkan_warning_shown = True
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(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.16.5
3
+ Version: 0.16.8
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,17 +1,17 @@
1
1
  pyloid/__init__.py,sha256=OOPhOKNQVmAM8hnfTeE7lHzxb8LsFNcgegBAvDrA-vY,293
2
2
  pyloid/api.py,sha256=np0pFVUlen_GpN0svY0A3awY_ZjVFk-RpHQZZKFUMuo,2157
3
3
  pyloid/autostart.py,sha256=K7DQYl4LHItvPp0bt1V9WwaaZmVSTeGvadkcwG-KKrI,3899
4
- pyloid/browser_window.py,sha256=aISmYtmf-suKPiN42wGskeNRVlkmkSV4CIKKfB-W8Cw,58251
4
+ pyloid/browser_window.py,sha256=P5YPbTu6v84B4-KYy_RmbAvgllMw2MTGaNSu5q77bOg,59946
5
5
  pyloid/custom/titlebar.py,sha256=itzK9pJbZMQ7BKca9kdbuHMffurrw15UijR6OU03Xsk,3894
6
6
  pyloid/filewatcher.py,sha256=3M5zWVUf1OhlkWJcDFC8ZA9agO4Q-U8WdgGpy6kaVz0,4601
7
7
  pyloid/js_api/event_api.py,sha256=_52yyBonqecmMvJpFW7OMNi_jX8Nrteqw_kI6r-DGG0,951
8
8
  pyloid/js_api/window_api.py,sha256=_EAZ0GG0oa0EeIIyWnys03InLQuQfv4ZPezMouOJEGc,8155
9
9
  pyloid/monitor.py,sha256=nmcoOmlHeTysrZVT5mmL92ASbqMg8aH-hQg35qKWi0M,27540
10
- pyloid/pyloid.py,sha256=2YcI0vn5VvCf4oXwsS3Y_7itlzjGlHQEQIbpwR_rkZ4,43874
10
+ pyloid/pyloid.py,sha256=lctL2ZV3tCMUTQ8BEa4NgVb-3yVV_E8cXQXxFJrONI8,43919
11
11
  pyloid/timer.py,sha256=RqMsChFUd93cxMVgkHWiIKrci0QDTBgJSTULnAtYT8M,8712
12
12
  pyloid/tray.py,sha256=D12opVEc2wc2T4tK9epaN1oOdeziScsIVNM2uCN7C-A,1710
13
13
  pyloid/utils.py,sha256=VGZE2liY8_AElEqxVe1YLbk3fWlcAevpRc6oOTTgi-U,1927
14
- pyloid-0.16.5.dist-info/LICENSE,sha256=MTYF-6xpRekyTUglRweWtbfbwBL1I_3Bgfbm_SNOuI8,11525
15
- pyloid-0.16.5.dist-info/METADATA,sha256=P8jz2kA5mL5UU9U-LqjGhwfpKLCHg8x6o2nzFOyn7Fs,3050
16
- pyloid-0.16.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
17
- pyloid-0.16.5.dist-info/RECORD,,
14
+ pyloid-0.16.8.dist-info/LICENSE,sha256=MTYF-6xpRekyTUglRweWtbfbwBL1I_3Bgfbm_SNOuI8,11525
15
+ pyloid-0.16.8.dist-info/METADATA,sha256=uM5gdK4ujV9yGed2XREQZfQgoqzCvRCOeFokQb8djSY,3050
16
+ pyloid-0.16.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
17
+ pyloid-0.16.8.dist-info/RECORD,,