pyloid 0.16.10__tar.gz → 0.16.11__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.16.10
3
+ Version: 0.16.11
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.16.10"
3
+ version = "0.16.11"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -895,3 +895,27 @@ class Monitor():
895
895
  monitor = self.screen
896
896
  monitor.refreshRateChanged.connect(callback)
897
897
 
898
+ def virtual_geometry_changed(self, callback: Callable):
899
+ """
900
+ Registers a callback for the event that occurs when the virtual geometry of the monitor changes.
901
+
902
+ Parameters
903
+ ----------
904
+ callback : Callable
905
+ The function to be called when the virtual geometry changes.
906
+
907
+ Examples
908
+ --------
909
+ ```python
910
+ app = Pyloid("Pyloid-App")
911
+
912
+ def on_virtual_geometry_changed():
913
+ print("Virtual geometry changed!")
914
+
915
+ monitor = app.get_primary_monitor()
916
+ monitor.virtual_geometry_changed(on_virtual_geometry_changed)
917
+ ```
918
+ """
919
+ monitor = self.screen
920
+ monitor.virtualGeometryChanged.connect(callback)
921
+
@@ -12,7 +12,7 @@ from PySide6.QtGui import (
12
12
  QImage,
13
13
  QAction,
14
14
  )
15
- from PySide6.QtCore import Qt, Signal, QObject, QTimer
15
+ from PySide6.QtCore import Qt, Signal, QObject, QTimer, QEvent
16
16
  from PySide6.QtNetwork import QLocalServer, QLocalSocket
17
17
  from .api import PyloidAPI
18
18
  from typing import List, Optional, Dict, Callable, Union, Literal
@@ -1395,4 +1395,4 @@ class Pyloid(QApplication):
1395
1395
  window.web_view.page().runJavaScript(js_code)
1396
1396
  window.web_view.page().setBackgroundColor(
1397
1397
  Qt.GlobalColor.black if self.theme == "dark" else Qt.GlobalColor.white
1398
- )
1398
+ )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes